DiscardedRowsFilter implements Function<String[], Boolean> { private DiscardedRowsFilter(Builder builder) { this.indices = builder.indices; } private  DiscardedRowsFilter(Builder builder); @Override Boolean call(String[] tokens);  }
@Test public void testDiscardedRowsFilter() { DiscardedRowsFilter discardedRowsFilter = new DiscardedRowsFilter.Builder().indices(discardedIndices).build(); boolean shouldKeep = discardedRowsFilter.call(new String[] { "1.2", "2", "hi", "na" }); Assert.assertEquals(shouldKeep, true); shouldKeep = discardedRowsFilter.call(new String[] { "1.2", "?", "hi", "na" }); Assert.assertEquals(shouldKeep, false); shouldKeep = discardedRowsFilter.call(new String[] { "1.2", "2.11", "NA", "na" }); Assert.assertEquals(shouldKeep, false); shouldKeep = discardedRowsFilter.call(new String[] { "1.2", "1.112", "hi", "" }); Assert.assertEquals(shouldKeep, false); }