### Question:
UserSubject implements Serializable { @Id public String getId() { return this.id; } UserSubject();  UserSubject(String login);  UserSubject(String login, List<String> roles);  UserSubject(String login, String id);  UserSubject(String login, String id, List<String> roles);  UserSubject(UserSubject sub); String getLogin(); void setLogin(String login); @ElementCollection(fetch = FetchType.EAGER) @OrderColumn List<String> getRoles(); void setRoles(List<String> roles); @ElementCollection(fetch = FetchType.EAGER) @MapKeyColumn(name = "name") Map<String, String> getProperties(); void setProperties(Map<String, String> properties); @Id String getId(); void setId(String id); AuthenticationMethod getAuthenticationMethod(); void setAuthenticationMethod(AuthenticationMethod method);  }### Answer:
@Test public void testId() { UserSubject userSubject = new UserSubject(); assertNotNull(userSubject.getId()); userSubject = new UserSubject("someLogin"); assertNotNull(userSubject.getId()); userSubject = new UserSubject("someLogin", Collections.singletonList("somerole")); assertNotNull(userSubject.getId()); UserSubject newSubject = new UserSubject(userSubject); assertEquals(userSubject.getId(), newSubject.getId()); }