### Question:
BeanFilter { public Set<String> processBeanFields(Collection<String> fields) { ImmutableSet.Builder<String> builder = ImmutableSet.builder(); for (String field : fields) { builder.add(field.toLowerCase()); while (field.contains(DELIMITER)) { field = field.substring(0, field.lastIndexOf(DELIMITER)); builder.add(field.toLowerCase()); } } return builder.build(); }  Object createFilteredBean(Object data, Set<String> fields); Set<String> processBeanFields(Collection<String> fields); List<String> getBeanFields(Class<?> bean, int depth); static final String ALL_FIELDS; static final String DELIMITER; }### Answer:
@Test public void testProcessFields() { Set<String> srcFields = ImmutableSet.of("A", "b", "c.d.e.f", "Case", "cAse", "CASE"); Set<String> newFields = beanFilter.processBeanFields(srcFields); assertEquals(7, newFields.size()); assertTrue(newFields.contains("a")); assertTrue(newFields.contains("b")); assertTrue(newFields.contains("c")); assertTrue(newFields.contains("c.d")); assertTrue(newFields.contains("c.d.e")); assertTrue(newFields.contains("c.d.e.f")); assertTrue(newFields.contains("case")); }