IdentityZoneHolder { public static String getCurrentZoneId() { return IDENTITY_ZONE_THREAD_LOCAL.get().getId(); }  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 getCurrentZoneId() { IdentityZone mockIdentityZone = mock(IdentityZone.class); String expectedId = UUID.randomUUID().toString(); when(mockIdentityZone.getId()).thenReturn(expectedId); IdentityZoneHolder.set(mockIdentityZone); assertThat(IdentityZoneHolder.getCurrentZoneId(), is(expectedId)); }