### Question:
OpenAMResourceSetStore implements ResourceSetStore { @Override public void delete(String resourceSetId, String resourceOwnerId) throws NotFoundException, ServerException { try { ResourceSetDescription token = read(resourceSetId, resourceOwnerId); delegate.delete(token.getId()); } catch (org.forgerock.openam.sm.datalayer.store.NotFoundException e) { throw new NotFoundException("Could not find resource set"); } catch (org.forgerock.openam.sm.datalayer.store.ServerException e) { throw new ServerException(e); } } @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 shouldNotDeleteResourceSetTokenIfResourceSetNotFound() throws Exception { store.delete("RESOURCE_SET_ID", "RESOURCE_OWNER_ID"); }