WorkArea { public List<String> getFieldIds() { return this.getFieldIds(null, false, true); } WorkArea(String id, SortedSet<Field> fields);  WorkArea(String id, SortedSet<Field> fields, List<Filter> outputFilters); ByteBuffer createBuffer(Map<String, Object> parameters); ByteBuffer createBuffer(); Map<String, Object> parseResults(ByteBuffer buffer); List<String> getFieldIds(); List<String> getFieldIds(Comparator<Field> comparator, boolean includeFiltered, boolean includeInputFields); int length(); Field findField(String id); String getId(); boolean isFiltered(Field field); @Override String toString();  }
@Test public void testGetFieldIds_default() { assertEquals(Arrays.asList("fieldTwo","fieldComposite","fieldFour","fieldFive"), workAreaWithFilters.getFieldIds()); assertEquals(workAreaWithFilters.getFieldIds(null,false,true), workAreaWithFilters.getFieldIds()); assertEquals(workAreaWithFilters.getFieldIds(Field.DEFAULT_SORT,false,true), workAreaWithFilters.getFieldIds()); }
@Test public void testGetFieldIds_withComparator() { assertEquals(Arrays.asList("fieldComposite","fieldFive","fieldFour","fieldOne","fieldThree","fieldTwo"), workAreaWithFilters.getFieldIds(Field.NAME_SORT,true, true)); assertEquals(Arrays.asList("fieldFive"), workAreaWithFilters.getFieldIds(Field.NAME_SORT,true, false)); assertEquals(Arrays.asList("fieldComposite","fieldFive","fieldFour","fieldTwo"), workAreaWithFilters.getFieldIds(Field.NAME_SORT,false, true)); assertEquals(Arrays.asList("fieldFive"), workAreaWithFilters.getFieldIds(Field.NAME_SORT,false, false)); }