### Question:
OMTransactionInfoCodec implements Codec<OMTransactionInfo> { @Override public OMTransactionInfo fromPersistedFormat(byte[] rawData) throws IOException { checkNotNull(rawData, "Null byte array can't be converted to " + "real object."); return OMTransactionInfo.getFromByteArray(rawData); }  @Override byte[] toPersistedFormat(OMTransactionInfo object); @Override OMTransactionInfo fromPersistedFormat(byte[] rawData); @Override OMTransactionInfo copyObject(OMTransactionInfo object);  }### Answer:
@Test public void testCodecWithNullDataFromTable() throws Exception { thrown.expect(NullPointerException.class); codec.fromPersistedFormat(null); }
@Test public void testCodecWithIncorrectValues() throws Exception { try { codec.fromPersistedFormat("random".getBytes(StandardCharsets.UTF_8)); fail("testCodecWithIncorrectValues failed"); } catch (IllegalStateException ex) { GenericTestUtils.assertExceptionContains("Incorrect TransactionInfo " + "value", ex); } }