### Question:
UncachedKeyRing { public static UncachedKeyRing decodeFromData(byte[] data) throws PgpGeneralException, IOException { IteratorWithIOThrow<UncachedKeyRing> parsed = fromStream(new ByteArrayInputStream(data)); if ( ! parsed.hasNext()) { throw new PgpGeneralException("Object not recognized as PGPKeyRing!"); } UncachedKeyRing ring = parsed.next(); if (parsed.hasNext()) { throw new PgpGeneralException("Expected single keyring in stream, found at least two"); } return ring; } UncachedKeyRing(PGPKeyRing ring); long getMasterKeyId(); UncachedPublicKey getPublicKey(); UncachedPublicKey getPublicKey(long keyId); Iterator<UncachedPublicKey> getPublicKeys(); boolean isSecret(); byte[] getEncoded(); void encode(OutputStream out); byte[] getFingerprint(); int getVersion(); static UncachedKeyRing decodeFromData(byte[] data); static IteratorWithIOThrow<UncachedKeyRing> fromStream(final InputStream stream); boolean containsSubkey(String expectedFingerprint); void encodeArmored(OutputStream out, String version); @SuppressWarnings("ConstantConditions") CanonicalizedKeyRing canonicalize(OperationLog log, int indent); @SuppressWarnings("ConstantConditions") CanonicalizedKeyRing canonicalize(OperationLog log, int indent, boolean forExport); UncachedKeyRing merge(UncachedKeyRing other, OperationLog log, int indent); UncachedKeyRing extractPublicKeyRing();  }### Answer:
@Test(expected = PgpGeneralException.class) public void testDecodeFromEmpty() throws Exception { UncachedKeyRing.decodeFromData(new byte[0]); }