Skip to content

Instantly share code, notes, and snippets.

@billy-bacon
Created December 13, 2013 17:08
Show Gist options
  • Save billy-bacon/7947598 to your computer and use it in GitHub Desktop.
Save billy-bacon/7947598 to your computer and use it in GitHub Desktop.
public class PatronBorrowsAvailableTimerRouteTest extends AbstractRouteTest {
@Produce(uri = "{{borrows.available.notification.timer}}")
protected ProducerTemplate start;
@EndpointInject(uri = "{{cloud.watch.out}}")
protected MockEndpoint cloudWatchEndpoint;
@EndpointInject(uri = "{{borrows.available.trigger.out}}")
protected MockEndpoint triggerEndpoint;
@Test
public void should_send_message_for_push_notification_start() throws Exception {
// setup test
cloudWatchEndpoint.setExpectedMessageCount(1);
triggerEndpoint.setExpectedMessageCount(1);
// run test
start.sendBody("push notification start");
// describe and verify expected behavior
assertMockEndpointsSatisfied();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment