ResultSetMappingManager { public SparqlResultMapper getMapper(String mappingName) { if (!mappers.containsKey(mappingName)) { throw new IllegalArgumentException("Mapping " + mappingName + " not found in this persistence unit."); } return mappers.get(mappingName); }  void addMapper(String mappingName, SparqlResultMapper mapper); SparqlResultMapper getMapper(String mappingName);  }
@Test public void getMapperThrowsIllegalArgumentWhenMapperForMappingNameDoesNotExist() { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("Mapping " + NAME + " not found in this persistence unit."); manager.getMapper(NAME); }