TermResourceProvider extends BaseResourceProvider implements ResourceProvider { @Override public Collection<String> createResources(Request request) throws InvalidQueryException, ResourceNotFoundException { throw new UnsupportedOperationException("Creating multiple Terms in a request is not currently supported"); } TermResourceProvider(AtlasTypeSystem typeSystem); @Override Result getResourceById(Request request); Result getResources(Request request); void createResource(Request request); @Override Collection<String> createResources(Request request); @Override void updateResourceById(Request request); @Override void deleteResourceById(Request request);  }
@Test(expectedExceptions = UnsupportedOperationException.class) public void testCreateResources() throws Exception { AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class); QueryFactory queryFactory = createStrictMock(QueryFactory.class); replay(typeSystem, queryFactory); TermPath termPath = new TermPath("testTaxonomy", "termName"); Map<String, Object> requestProperties = new HashMap<>(); requestProperties.put("termPath", termPath); Request userRequest = new InstanceRequest(requestProperties); TermResourceProvider provider = new TermResourceProvider(typeSystem); provider.setQueryFactory(queryFactory); provider.createResources(userRequest); }