@Test public void mapReject() { ResponseWrapper wrapper = new ResponseWrapperMapper().map(rejectPacket); assertThat(wrapper.get()).isEqualTo(rejectPacket); }
public final T map(final InterledgerResponsePacket responsePacket) { Objects.requireNonNull(responsePacket); if (InterledgerFulfillPacket.class.isAssignableFrom(responsePacket.getClass())) { return mapFulfillPacket((IldcpResponsePacket) responsePacket); } else if (InterledgerRejectPacket.class.isAssignableFrom(responsePacket.getClass())) { return mapRejectPacket((InterledgerRejectPacket) responsePacket); } else { throw new RuntimeException( String.format("Unsupported IldcpResponsePacket Type: %s", responsePacket.getClass())); } }
IldcpResponsePacketMapper { public final T map(final InterledgerResponsePacket responsePacket) { Objects.requireNonNull(responsePacket); if (InterledgerFulfillPacket.class.isAssignableFrom(responsePacket.getClass())) { return mapFulfillPacket((IldcpResponsePacket) responsePacket); } else if (InterledgerRejectPacket.class.isAssignableFrom(responsePacket.getClass())) { return mapRejectPacket((InterledgerRejectPacket) responsePacket); } else { throw new RuntimeException( String.format("Unsupported IldcpResponsePacket Type: %s", responsePacket.getClass())); } } }
IldcpResponsePacketMapper { public final T map(final InterledgerResponsePacket responsePacket) { Objects.requireNonNull(responsePacket); if (InterledgerFulfillPacket.class.isAssignableFrom(responsePacket.getClass())) { return mapFulfillPacket((IldcpResponsePacket) responsePacket); } else if (InterledgerRejectPacket.class.isAssignableFrom(responsePacket.getClass())) { return mapRejectPacket((InterledgerRejectPacket) responsePacket); } else { throw new RuntimeException( String.format("Unsupported IldcpResponsePacket Type: %s", responsePacket.getClass())); } }  }
IldcpResponsePacketMapper { public final T map(final InterledgerResponsePacket responsePacket) { Objects.requireNonNull(responsePacket); if (InterledgerFulfillPacket.class.isAssignableFrom(responsePacket.getClass())) { return mapFulfillPacket((IldcpResponsePacket) responsePacket); } else if (InterledgerRejectPacket.class.isAssignableFrom(responsePacket.getClass())) { return mapRejectPacket((InterledgerRejectPacket) responsePacket); } else { throw new RuntimeException( String.format("Unsupported IldcpResponsePacket Type: %s", responsePacket.getClass())); } }  final T map(final InterledgerResponsePacket responsePacket); }
IldcpResponsePacketMapper { public final T map(final InterledgerResponsePacket responsePacket) { Objects.requireNonNull(responsePacket); if (InterledgerFulfillPacket.class.isAssignableFrom(responsePacket.getClass())) { return mapFulfillPacket((IldcpResponsePacket) responsePacket); } else if (InterledgerRejectPacket.class.isAssignableFrom(responsePacket.getClass())) { return mapRejectPacket((InterledgerRejectPacket) responsePacket); } else { throw new RuntimeException( String.format("Unsupported IldcpResponsePacket Type: %s", responsePacket.getClass())); } }  final T map(final InterledgerResponsePacket responsePacket);  }