SsoConfig { public static boolean excludes(String url){ if(stopsso){ return true; } return Pattern.matches(SsoConfig.excludeRegex, url); }  static boolean excludes(String url); static final String excludeRegex; static boolean stopsso; }
@Test public void testSsoConfigTest(){ Assert.assertTrue(SsoConfig.excludes("/api/")); Assert.assertTrue(SsoConfig.excludes("/api/abc")); Assert.assertFalse(SsoConfig.excludes( "/api")); Assert.assertTrue(SsoConfig.excludes("/health")); }