NoSecretKeysetHandle { public static final KeysetHandle read(KeysetReader reader) throws GeneralSecurityException, IOException { Keyset keyset = reader.read(); validate(keyset); return KeysetHandle.fromKeyset(keyset); }  @Deprecated static final KeysetHandle parseFrom(final byte[] serialized); static final KeysetHandle read(KeysetReader reader);  }
@Test public void testVoidInputs() throws Exception { KeysetHandle unused; try { unused = NoSecretKeysetHandle.read(BinaryKeysetReader.withBytes(new byte[0])); fail("Expected GeneralSecurityException"); } catch (GeneralSecurityException e) { assertExceptionContains(e, "empty keyset"); } try { unused = NoSecretKeysetHandle.read(BinaryKeysetReader.withBytes(new byte[0])); fail("Expected GeneralSecurityException"); } catch (GeneralSecurityException e) { assertExceptionContains(e, "empty keyset"); } }