@Test
public void testGetScanConfig() throws Exception {

    final List<Criteria.Field> fr = new ArrayList<>();
    fr.add(new CriteriaImpl.FieldImpl("notifierName", "test_notifier"));
    fr.add(new CriteriaImpl.FieldImpl("status", "NEW"));
    final List<byte[]> nnList = Arrays.asList("s".getBytes(CHARSET),
                                              "qs".getBytes(CHARSET),
                                              "NEW".getBytes(CHARSET));
    new Expectations() {
        {
            mockNotificationCriteria.clazz();
            times = 1;
            result = Notification.class;
            mockNotificationCriteria.fieldRestrictions();
            times = 1;
            result = fr;
            mockIndexMapper.getIndexedFieldNames(); times = 1;
            result = Arrays.asList("notifierName");
            mockNotificationCriteria.numRows(); times = 1;
            result = 5;
            mockIndexMapper.mapMemberValue("status", "NEW"); times = 1;
            result = nnList;
        }
    };
    hBaseScanConfigBuilder = new HBaseScanConfigBuilder();
    hBaseScanConfigBuilder.addMappers(Notification.class, Arrays.asList(mockIndexMapper));
    Criteria<Notification> eventCriteria = new CriteriaImpl<>(Notification.class);
    HBaseScanConfig<Notification> notificationScanConfig = hBaseScanConfigBuilder.getScanConfig(mockNotificationCriteria);
    System.out.println(notificationScanConfig);
    assertEquals(mockIndexMapper, notificationScanConfig.getMapper());
    assertArrayEquals("test_notifier|0".getBytes(CHARSET), notificationScanConfig.getStartRow());
    assertArrayEquals(("test_notifier|"+Long.MAX_VALUE).getBytes(CHARSET), notificationScanConfig.getStopRow());
    assertEquals(2, notificationScanConfig.filterList().getFilters().size());
    // column filter should be first
    Filter firstFilter = notificationScanConfig.filterList().getFilters().get(0);
    assertEquals(SingleColumnValueFilter.class, firstFilter.getClass());
    // page filter should be last
    Filter secondFilter = notificationScanConfig.filterList().getFilters().get(1);
    assertEquals(PageFilter.class, secondFilter.getClass());
}