### Question:
StaticRSAKeyProvider implements RSAKeyProvider { @Override public RSAPublicKey getPublicKeyById(String keyId) { if (!keys.containsKey(keyId)) { throw new NoSuchElementException(String.format("KeyId %s is not defined to authorize GRPC requests", keyId)); } return keys.get(keyId); } StaticRSAKeyProvider(Map<String, String> keys); @Override RSAPublicKey getPublicKeyById(String keyId); @Override RSAPrivateKey getPrivateKey(); @Override String getPrivateKeyId();  }### Answer:
@Test void shouldComplainOnNotFoundKey() { assertThatThrownBy(() -> new StaticRSAKeyProvider(Map.of( "valid", STRIPPED_4096 )).getPublicKeyById("unknown")) .isInstanceOf(NoSuchElementException.class); }