@Test
public void testUpdateFetchPositionResetToLatestOffset() {

    subscriptions.assignFromUser(Arrays.asList(tp));
    subscriptions.needOffsetReset(tp, OffsetResetStrategy.LATEST);
    client.prepareResponse(listOffsetRequestMatcher(ListOffsetRequest.LATEST_TIMESTAMP),
                           listOffsetResponse(Errors.NONE, Arrays.asList(5L)));
    fetcher.updateFetchPositions(Collections.singleton(tp));
    assertFalse(subscriptions.isOffsetResetNeeded(tp));
    assertTrue(subscriptions.isFetchable(tp));
    assertEquals(5, subscriptions.position(tp).longValue());
}