### Question:
AuthenticationResponse extends SecurityResponse { public static AuthenticationResponse success(Subject subject) { return builder().status(SecurityStatus.SUCCESS).user(subject).build(); } AuthenticationResponse(Builder builder); static Builder builder(); static AuthenticationResponse failed(String message, Throwable cause); static AuthenticationResponse failed(String message); static AuthenticationResponse abstain(); static AuthenticationResponse success(Subject subject); static AuthenticationResponse success(Subject user, Subject service); static AuthenticationResponse successService(Subject service); static AuthenticationResponse success(Principal principal); static AuthenticationResponse successService(Principal principal); Optional<Subject> user(); Optional<Subject> service(); @Override String toString();  }### Answer:
@Test public void testSuccessPrincipal() { Principal myPrincipal = Principal.create("aUser"); AuthenticationResponse response = AuthenticationResponse.success(myPrincipal); validateSuccessResponse(response, myPrincipal, null); }