IdentityZoneHolder { public static void set(IdentityZone zone) { IDENTITY_ZONE_THREAD_LOCAL.set(zone); KEY_MANAGER_THREAD_LOCAL.set(null); }  static void setProvisioning(IdentityZoneProvisioning provisioning); static IdentityZone get(); static KeyManager getSamlSPKeyManager(); static IdentityZone getUaaZone(); static void set(IdentityZone zone); static void clear(); static boolean isUaa(); static String getCurrentZoneId();  }
@Test void set() { IdentityZone mockIdentityZone = mock(IdentityZone.class); getKeyManagerThreadLocal().set(mock(KeyManager.class)); IdentityZoneHolder.set(mockIdentityZone); assertThat(IdentityZoneHolder.get(), is(mockIdentityZone)); assertThat(getKeyManagerThreadLocal().get(), is(nullValue())); }