@Test
public void newKeyData_valueLengthCorrect() throws Exception {

  KeyManager<Aead> keyManager = new KeyManagerImpl<>(new TestKeyTypeManager(), Aead.class);
  // We allow the keysize to be bigger than 16 since proto serialized adds some overhead.
  assertThat(
          keyManager
              .newKeyData(AesGcmKeyFormat.newBuilder().setKeySize(16).build().toByteString())
              .getValue()
              .size())
      .isAtLeast(16);
}