@Test
public void testOverrideViewWithHasRestrictedPartitions() {

    // Create view
    final View view = new View();
    view.setPartitions("2,3,4");
    // Create consume request
    final ConsumeRequest consumeRequest = new ConsumeRequest();
    consumeRequest.setPartitions("2,3");
    // Create instance & override
    final ViewCustomizer viewCustomizer = new ViewCustomizer(view, consumeRequest);
    viewCustomizer.overrideViewSettings();
    assertEquals("should have partitions 2 and 3", "2,3", view.getPartitions());
    assertEquals("should have partitions 2 and 3", 2, view.getPartitionsAsSet().size());
    assertTrue("should have partitions 2 and 3", view.getPartitionsAsSet().contains(2));
    assertTrue("should have partitions 2 and 3", view.getPartitionsAsSet().contains(3));
}