payments.send(MessageBuilder.withPayload(new Invoice()).build());
}
@Test
public void testCreditCardRouting() {
CreditCardPayment payment = new CreditCardPayment();
payment.setCreditCardType(CreditCardType.MASTERCARD);
payments.send(MessageBuilder.withPayload(payment).build());
Message<?> result = mastercardChannel.receive(0);
assertNotNull(result);
assertEquals(CreditCardPayment.class, result.getPayload().getClass());
assertEquals(payment, result.getPayload());