@Test
public void shouldGetPartitions() throws IOException {

    server.expectRequestTo("http://example.com/event-types/foobar/partitions", "GET")
            .andRespondWith(200, ContentType.APPLICATION_JSON, "[{\"partition\":\"0\", \"oldest_available_offset\":\"10\", \"newest_available_offset\":\"20\"},{\"partition\":\"1\", \"oldest_available_offset\":\"BEGIN\",\"newest_available_offset\":\"10\"}]")
    .setup();
    final List<Partition> partitions = client.getPartitions("foobar");
    assertNotNull(partitions);
    assertThat(partitions, hasSize(2));
    server.verify();
}