Indeed, this test is asserting that an exception is thrown if no id is passed. The saving operation cannot be completed if you tell the instance that is not new but fail to pass a primary key.