LegacyTokenKey { public static void setLegacySigningKey(String legacySigningKey, String uaaUrl) { if (!StringUtils.hasText(legacySigningKey)) { return; } LegacyTokenKey.keyInfo = KeyInfoBuilder.build(LEGACY_TOKEN_KEY_ID, legacySigningKey, uaaUrl); } private  LegacyTokenKey(); static void setLegacySigningKey(String legacySigningKey, String uaaUrl); static KeyInfo getLegacyTokenKeyInfo(); static final String LEGACY_TOKEN_KEY_ID; }
@Test public void buildLegacyTokenKey_withInvalidKeyUrl() { expectedException.expect(IllegalArgumentException.class); expectedException.expectMessage("Invalid Key URL"); LegacyTokenKey.setLegacySigningKey("secret", "not a valid url"); }