KeyInfo { public abstract String type();  abstract void verify(); abstract SignatureVerifier getVerifier(); abstract Signer getSigner(); abstract String keyId(); abstract String keyURL(); abstract String type(); abstract String verifierKey(); abstract Map<String, Object> getJwkMap(); abstract String algorithm();  }
@Test public void HmacKeyShouldSetFieldsCorrectly() { HmacKeyInfo hmacKeyInfo = new HmacKeyInfo("key-id", "secret", "https: assertThat(hmacKeyInfo.type(), is("MAC")); }
@Test public void RsaKeyShouldSetFieldsCorrectly() { RsaKeyInfo hmacKeyInfo = new RsaKeyInfo("key-id", sampleRsaPrivateKey, "https: assertThat(hmacKeyInfo.type(), is("RSA")); }