### Question:
GLTransaction extends Cloneable { public GLTransaction createReverse() { return createReverse(false); } GLTransaction();  GLTransaction(String detail);  GLTransaction(Element elem); long getId(); void setId(long id); void setTimestamp(Date d); Date getTimestamp(); void setPostDate(Date d); Date getPostDate(); void setDetail(String detail); String getDetail(); void setTags(Tags tags); Tags getTags(); GLTransaction addTag(String tag); void setEntries(List<GLEntry> entries); List<GLEntry> getEntries(); Journal getJournal(); void setJournal(Journal journal); GLEntry createGLEntry(FinalAccount acct, BigDecimal amount, String detail, boolean isCredit, short layer); GLEntry createDebit(FinalAccount acct, BigDecimal amount); GLEntry createDebit(FinalAccount acct, BigDecimal amount, String detail); GLEntry createDebit(FinalAccount acct, BigDecimal amount, String detail, short layer); GLEntry createCredit(FinalAccount acct, BigDecimal amount); GLEntry createCredit(FinalAccount acct, BigDecimal amount, String detail); GLEntry createCredit(FinalAccount acct, BigDecimal amount, String detail, short layer); GLTransaction createReverse(); GLTransaction createReverse(boolean keepEntryTags); GLTransaction createReverse(Tags withTags, Tags withoutTags); GLTransaction createReverse(Tags withTags, Tags withoutTags, boolean keepEntryTags); void fromXML(Element elem); Element toXML(boolean deep); String toString(); boolean equals(Object other); int hashCode(); boolean hasLayers(short[] layers); BigDecimal getDebits(short[] layers); BigDecimal getCredits(short[] layers); BigDecimal getImpact(Account acct, short[] layers); @Override GLTransaction clone();  }### Answer:
@Test void testCreateReverse() { GLTransaction reversal = transactionForReverse. createReverse(); Assertions.assertEquals(reversal.getImpact(bobEquity, LAYERS), transactionForReverse.getImpact(bobEquity, LAYERS).negate(), "reverse impact is not the opposite"); Assertions.assertEquals(reversal.getImpact(aliceEquity, LAYERS), transactionForReverse.getImpact(aliceEquity, LAYERS).negate(), "reverse impact is not the opposite"); Assertions.assertEquals(reversal.getEntries().size(), 2); for (GLEntry entry : reversal.getEntries()) { Assertions.assertNull(entry.getTags()); } }