EntityResourceProvider extends BaseResourceProvider implements ResourceProvider { @Override public Collection<String> createResources(Request request) throws InvalidQueryException, ResourceNotFoundException { throw new UnsupportedOperationException("Creation of entities is not currently supported"); } EntityResourceProvider(AtlasTypeSystem typeSystem); @Override Result getResourceById(Request request); @Override Result getResources(Request request); @Override void createResource(Request request); @Override Collection<String> createResources(Request request);  }
@Test(expectedExceptions = UnsupportedOperationException.class) public void testCreateResources() throws Exception { AtlasTypeSystem typeSystem = createStrictMock(AtlasTypeSystem.class); QueryFactory queryFactory = createStrictMock(QueryFactory.class); AtlasQuery query = createStrictMock(AtlasQuery.class); replay(typeSystem, queryFactory, query); Map<String, Object> requestProperties = new HashMap<>(); requestProperties.put("id", "1"); Request userRequest = new InstanceRequest(requestProperties); EntityResourceProvider provider = new EntityResourceProvider(typeSystem); provider.setQueryFactory(queryFactory); provider.createResources(userRequest); }