### Question:
CompartmentCache { public List<String> getParametersByResourceTypeInCompartment(String resourceType) { List<String> results; if (resourceType != null && codeAndParams.containsKey(resourceType)) { results = Collections.unmodifiableList(codeAndParams.get(resourceType)); } else { results = Collections.unmodifiableList(Collections.emptyList()); } return results; } CompartmentCache(); void add(java.lang.String inclusionCode, List<com.ibm.fhir.model.type.String> params); List<String> getResourceTypesInCompartment(); List<String> getParametersByResourceTypeInCompartment(String resourceType);  }### Answer:
@Test() public void testGetParametersByResourceTypeInCompartmentWhenEmptyCompartmentCache() { CompartmentCache cache = new CompartmentCache(); List<String> results = cache.getParametersByResourceTypeInCompartment(null); assertNotNull(results); assertTrue(results.isEmpty()); results = cache.getParametersByResourceTypeInCompartment("FudgeBrownie"); assertNotNull(results); assertTrue(results.isEmpty()); }
@Test(expectedExceptions = { UnsupportedOperationException.class }) public void testGetResourceTypesInCompartmentUnmodifiable() { CompartmentCache cache = new CompartmentCache(); List<String> results = cache.getParametersByResourceTypeInCompartment("FudgeBrownie"); assertNotNull(results); results.clear(); }