@Test
public void getsUserPrincipal() {

    Principal principal = mock(Principal.class);
    when(securityContext.getUserPrincipal()).thenReturn(principal);
    assertSame(principal, containerRequest.getUserPrincipal());
}