### Question:
UserSession extends DefaultBaseEntity { public void setUser(final SecurityUser user) { userId = user.getId(); this.user = user; }  UUID getUserId(); SecurityUser getUser(); void setUser(final SecurityUser user);  }### Answer:
@Test public void testValidate() { final UserSession s = new UserSession(); s.setUser(new User()); assertTrue(validator.validate(s).isEmpty()); }