### Question:
DefaultSecurityContext implements LoginSecurityContext { public Subject getSubject() { return subject; } DefaultSecurityContext(Subject subject);  DefaultSecurityContext(String principalName, Subject subject);  DefaultSecurityContext(Principal p, Subject subject); Principal getUserPrincipal(); boolean isUserInRole(String role); Subject getSubject(); Set<Principal> getUserRoles(); static boolean isGroupPrincipal(Principal principal);  }### Answer:
@Test public void testGetSubject() { Subject s = new Subject(); assertSame(new DefaultSecurityContext(s).getSubject(), s); }