### Question:
TransactionContext extends AbstractContext { public void copyFrom(TransactionContext other) { super.copyFrom(other); response.copyFrom(other.response); request.copyFrom(other.request); user.copyFrom(other.user); }  void copyFrom(TransactionContext other); Object getCustom(String key); Response getResponse(); void addCustom(String key, String value); void addCustom(String key, Number value); void addCustom(String key, boolean value); boolean hasCustom(); Iterator<? extends Map.Entry<String, ?>> getCustomIterator(); Request getRequest(); User getUser(); @Override void resetState(); void onTransactionEnd();  }### Answer:
@Test void testCopyFrom() { TransactionContext context = createContext(); TransactionContext copyOfContext = new TransactionContext(); copyOfContext.copyFrom(context); assertThat(toJson(context)).isEqualTo(toJson(copyOfContext)); }
@Test void testCopyFromCopiesTags() { TransactionContext context = new TransactionContext(); context.addLabel("foo", "bar"); TransactionContext copyOfContext = new TransactionContext(); copyOfContext.copyFrom(context); assertThat(copyOfContext.getLabel("foo")).isEqualTo("bar"); }