@Test
public void newKey_byteString_throwsUnsupportedOperation() throws Exception {

  KeyManager<Void> keyManager =
      new KeyManagerImpl<>(new TestKeyTypeManagerWithoutKeyFactory(), Void.class);
  try {
    keyManager.newKey(ByteString.copyFromUtf8(""));
    fail("UnsupportedOperationException expected");
  } catch (UnsupportedOperationException e) {
    // expected
  }
}