JAASSecurityProvider implements SecurityProvider { @Override public String validate(String tenant, String principal) throws SecurityProviderException { return tenant == null ? DEFAULT_TENANT : tenant; }  @Override String validate(String tenant, String principal);  }
@Test public void testValidateDefault() { JAASSecurityProvider sp = new JAASSecurityProvider(); String result = null; try { result = sp.validate(null, "anyone"); } catch (SecurityProviderException e) { fail("SecurityProviderException thrown: "+e); } assertEquals(JAASSecurityProvider.DEFAULT_TENANT, result); }