AnonSecurityContext implements SecurityContext { @Override public String getAuthenticationScheme() { return null; } AnonSecurityContext();  AnonSecurityContext(boolean secure); @Override Principal getUserPrincipal(); @Override boolean isUserInRole(String role); @Override boolean isSecure(); @Override String getAuthenticationScheme();  }
@Test public void getAuthenticationScheme_ShouldAlwaysBeNull() { assertNull(new AnonSecurityContext().getAuthenticationScheme()); assertNull(new AnonSecurityContext(false).getAuthenticationScheme()); assertNull(new AnonSecurityContext(true).getAuthenticationScheme()); }