### Question:
OpenAMResourceSetStore implements ResourceSetStore { @Override public ResourceSetDescription read(String resourceSetId, ResourceSetFilter filter) throws NotFoundException, ServerException { Set<ResourceSetDescription> resourceSets = query(QueryFilter.equalTo(ResourceSetTokenField.RESOURCE_SET_ID, resourceSetId)); if(filter != null) { resourceSets = filter.filter(resourceSets); } if(!resourceSets.isEmpty()) { return resourceSets.iterator().next(); } throw new NotFoundException("Resource set does not exist with id " + resourceSetId); } @Inject  OpenAMResourceSetStore(@Assisted String realm, OAuth2ProviderSettingsFactory providerSettingsFactory,
            OAuth2UrisFactory<RealmInfo> oauth2UrisFactory, TokenIdGenerator idGenerator,
            @DataLayer(ConnectionType.RESOURCE_SETS) TokenDataStore delegate); @Override void create(OAuth2Request request, ResourceSetDescription resourceSetDescription); @Override ResourceSetDescription read(String resourceSetId, ResourceSetFilter filter); @Override ResourceSetDescription read(String resourceSetId, String resourceOwnerId); @Override void update(ResourceSetDescription resourceSetDescription); @Override void delete(String resourceSetId, String resourceOwnerId); @Override Set<ResourceSetDescription> query(QueryFilter<String> query);  }### Answer:
@Test(expectedExceptions = NotFoundException.class) public void readWithResourceSetUidShouldThrowNotFoundExceptionWhenMultipleResourceSetsFound() throws Exception { given(dataStore.read("123")).willThrow(new org.forgerock.openam.sm.datalayer.store.NotFoundException("not found")); store.read("123", "RESOURCE_OWNER_ID"); }