use of org.zalando.nakadi.domain.PaginationLinks in project nakadi by zalando.
the class SubscriptionAT method testListSubscriptions.
@Test
public void testListSubscriptions() throws IOException {
final String etName = createEventType().getName();
final String filterApp = randomUUID();
final Subscription sub1 = createSubscription(RandomSubscriptionBuilder.builder().withEventType(etName).withOwningApplication(filterApp).buildSubscriptionBase());
final Subscription sub2 = createSubscription(RandomSubscriptionBuilder.builder().withEventType(etName).withOwningApplication(filterApp).buildSubscriptionBase());
createSubscription(RandomSubscriptionBuilder.builder().withEventType(etName).buildSubscriptionBase());
final PaginationWrapper expectedList = new PaginationWrapper(ImmutableList.of(sub2, sub1), new PaginationLinks());
given().param("owning_application", filterApp).get("/subscriptions").then().statusCode(HttpStatus.SC_OK).body(JSON_HELPER.matchesObject(expectedList));
}
Aggregations