O2SecurityContext implements SecurityContext { @Override public Principal getUserPrincipal() { return principal; } O2SecurityContext(final O2Principal principal); @Override Principal getUserPrincipal(); @Override boolean isUserInRole(final String role); @Override boolean isSecure(); @Override String getAuthenticationScheme();  }
@Test public void getUserPrincipal() { O2Principal p = new O2Principal(); O2SecurityContext context = new O2SecurityContext(p); assertSame(p, context.getUserPrincipal()); }