@Test public void cannotMap() { expectedException.expect(RuntimeException.class); expectedException.expectMessage("Unsupported IldcpResponsePacket Type: " + "class org.interledger.ildcp.InterledgerShampooPacketBuilder$ImmutableInterledgerShampooPacket"); new ResponseWrapperMapper().map(shampooPacket); }
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);  }