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