### Question:
BaseProvider { public Set<String> checkPropertyIds(Set<String> propertyIds) { if (!this.propertyIds.containsAll(propertyIds)) { Set<String> unsupportedPropertyIds = new HashSet<>(propertyIds); unsupportedPropertyIds.removeAll(combinedIds); Set<String> categoryProperties = new HashSet<>(); for (String unsupportedPropertyId : unsupportedPropertyIds) { if (checkCategory(unsupportedPropertyId) || checkRegExp(unsupportedPropertyId)) { categoryProperties.add(unsupportedPropertyId); } } unsupportedPropertyIds.removeAll(categoryProperties); return unsupportedPropertyIds; } return Collections.emptySet(); } BaseProvider(Set<String> propertyIds); Set<String> checkPropertyIds(Set<String> propertyIds); Set<String> getPropertyIds(); Set<String> getCategoryIds();  }### Answer:
@Test public void testCheckPropertyIds() { Set<String> propertyIds = new HashSet<>(); propertyIds.add("foo"); propertyIds.add("bar"); propertyIds.add("cat1/prop1"); propertyIds.add("cat2/prop2"); propertyIds.add("cat3/subcat3/prop3"); propertyIds.add("cat4/subcat4/map"); BaseProvider provider = new TestProvider(propertyIds); assertTrue(provider.checkPropertyIds(propertyIds).isEmpty()); assertTrue(provider.checkPropertyIds(Collections.singleton("cat1")).isEmpty()); assertTrue(provider.checkPropertyIds(Collections.singleton("cat2")).isEmpty()); assertTrue(provider.checkPropertyIds(Collections.singleton("cat3")).isEmpty()); assertTrue(provider.checkPropertyIds(Collections.singleton("cat3/subcat3")).isEmpty()); assertTrue(provider.checkPropertyIds( Collections.singleton("cat4/subcat4/map")).isEmpty()); assertTrue(provider.checkPropertyIds( Collections.singleton("cat4/subcat4/map/key")).isEmpty()); propertyIds.add("badprop"); propertyIds.add("badcat"); Set<String> unsupportedPropertyIds = provider.checkPropertyIds(propertyIds); assertFalse(unsupportedPropertyIds.isEmpty()); assertEquals(2, unsupportedPropertyIds.size()); assertTrue(unsupportedPropertyIds.contains("badprop")); assertTrue(unsupportedPropertyIds.contains("badcat")); }