### Question:
TxHash extends Hash implements Adaptor, Encodable { @SuppressWarnings("unchecked") @Override public <T> T adapt(Class<T> adaptor) { if (adaptor.isAssignableFrom(TxHash.class)) { return (T) this; } else if (adaptor.isAssignableFrom(BlockHash.class)) { return (T) BlockHash.of(getBytesValue()); } else if (adaptor.isAssignableFrom(ContractTxHash.class)) { return (T) ContractTxHash.of(getBytesValue()); } return null; } TxHash(final String encoded);  TxHash(final BytesValue bytesValue); static TxHash of(final String encoded); static TxHash of(final BytesValue bytesValue); @SuppressWarnings("unchecked") @Override T adapt(Class<T> adaptor); static final TxHash EMPTY; }### Answer:
@Test public void testAdapt() { final TxHash txHash = TxHash.of(encodedHash); assertEquals(TxHash.of(encodedHash), txHash.adapt(Hash.class)); assertEquals(BlockHash.of(encodedHash), txHash.adapt(BlockHash.class)); assertEquals(TxHash.of(encodedHash), txHash.adapt(TxHash.class)); assertEquals(ContractTxHash.of(encodedHash), txHash.adapt(ContractTxHash.class)); }