@Test
public void testWrap_registerSecondWrapperForEncryptOnly_throws() throws Exception {

  assertThrows(
      GeneralSecurityException.class,
      () -> {
        Registry.registerPrimitiveWrapper(
            new PrimitiveWrapper<Mac, EncryptOnly>() {
              @Override
              public EncryptOnly wrap(PrimitiveSet<Mac> primitiveSet) {
                return null;
              }
              @Override
              public Class<EncryptOnly> getPrimitiveClass() {
                return EncryptOnly.class;
              }
              @Override
              public Class<Mac> getInputPrimitiveClass() {
                return Mac.class;
              }
            });
      });
}