### Question:
BaseProvider { protected Set<String> getRequestPropertyIds(Request request, Predicate predicate) { Set<String> propertyIds = request.getPropertyIds(); if (propertyIds == null || propertyIds.isEmpty()) { return new HashSet<>(this.propertyIds); } propertyIds = new HashSet<>(propertyIds); if (predicate != null) { propertyIds.addAll(PredicateHelper.getPropertyIds(predicate)); } if (!combinedIds.containsAll(propertyIds)) { Set<String> keepers = new HashSet<>(); Set<String> unsupportedPropertyIds = new HashSet<>(propertyIds); unsupportedPropertyIds.removeAll(combinedIds); for (String unsupportedPropertyId : unsupportedPropertyIds) { if (checkCategory(unsupportedPropertyId) || checkRegExp(unsupportedPropertyId)) { keepers.add(unsupportedPropertyId); } } propertyIds.retainAll(combinedIds); propertyIds.addAll(keepers); } return propertyIds; } BaseProvider(Set<String> propertyIds); Set<String> checkPropertyIds(Set<String> propertyIds); Set<String> getPropertyIds(); Set<String> getCategoryIds();  }### Answer:
@Test public void testGetRequestPropertyIds() { Set<String> providerPropertyIds = new HashSet<>(); providerPropertyIds.add("foo"); providerPropertyIds.add("bar"); providerPropertyIds.add("cat1/sub1"); BaseProvider provider = new TestProvider(providerPropertyIds); Request request = PropertyHelper.getReadRequest("foo"); Set<String> requestedPropertyIds = provider.getRequestPropertyIds(request, null); assertEquals(1, requestedPropertyIds.size()); assertTrue(requestedPropertyIds.contains("foo")); request = PropertyHelper.getReadRequest("foo", "bar"); requestedPropertyIds = provider.getRequestPropertyIds(request, null); assertEquals(2, requestedPropertyIds.size()); assertTrue(requestedPropertyIds.contains("foo")); assertTrue(requestedPropertyIds.contains("bar")); request = PropertyHelper.getReadRequest("foo", "baz", "bar", "cat", "cat1/prop1"); requestedPropertyIds = provider.getRequestPropertyIds(request, null); assertEquals(2, requestedPropertyIds.size()); assertTrue(requestedPropertyIds.contains("foo")); assertTrue(requestedPropertyIds.contains("bar")); request = PropertyHelper.getReadRequest("foo", "cat1/sub1/prop1"); requestedPropertyIds = provider.getRequestPropertyIds(request, null); assertEquals(2, requestedPropertyIds.size()); assertTrue(requestedPropertyIds.contains("foo")); assertTrue(requestedPropertyIds.contains("cat1/sub1/prop1")); }