@Test(expected = IllegalArgumentException.class) public void createCreationFactoryOnParametrisedMethodWithNullParam() throws Exception { HashMap<String, Object> pathParameterValues = new HashMap<>(); pathParameterValues.put("id", null); ServiceProviderFactory.createCreationFactory(FAKE_BASE, pathParameterValues, FakeService.class.getMethod("fakeCreationFactoryWithId")); }
static CreationFactory createCreationFactory(final String baseURI, final Map<String, Object> pathParameterValues, final Method method) throws URISyntaxException { final Path classPathAnnotation = method.getDeclaringClass().getAnnotation(Path.class); final OslcCreationFactory creationFactoryAnnotation = method.getAnnotation( OslcCreationFactory.class); final Path methodPathAnnotation = method.getAnnotation(Path.class); CreationFactory creationFactory = createCreationFactory(baseURI, pathParameterValues, classPathAnnotation, creationFactoryAnnotation, methodPathAnnotation); return creationFactory; }
ServiceProviderFactory { static CreationFactory createCreationFactory(final String baseURI, final Map<String, Object> pathParameterValues, final Method method) throws URISyntaxException { final Path classPathAnnotation = method.getDeclaringClass().getAnnotation(Path.class); final OslcCreationFactory creationFactoryAnnotation = method.getAnnotation( OslcCreationFactory.class); final Path methodPathAnnotation = method.getAnnotation(Path.class); CreationFactory creationFactory = createCreationFactory(baseURI, pathParameterValues, classPathAnnotation, creationFactoryAnnotation, methodPathAnnotation); return creationFactory; } }
ServiceProviderFactory { static CreationFactory createCreationFactory(final String baseURI, final Map<String, Object> pathParameterValues, final Method method) throws URISyntaxException { final Path classPathAnnotation = method.getDeclaringClass().getAnnotation(Path.class); final OslcCreationFactory creationFactoryAnnotation = method.getAnnotation( OslcCreationFactory.class); final Path methodPathAnnotation = method.getAnnotation(Path.class); CreationFactory creationFactory = createCreationFactory(baseURI, pathParameterValues, classPathAnnotation, creationFactoryAnnotation, methodPathAnnotation); return creationFactory; } private  ServiceProviderFactory(); }
ServiceProviderFactory { static CreationFactory createCreationFactory(final String baseURI, final Map<String, Object> pathParameterValues, final Method method) throws URISyntaxException { final Path classPathAnnotation = method.getDeclaringClass().getAnnotation(Path.class); final OslcCreationFactory creationFactoryAnnotation = method.getAnnotation( OslcCreationFactory.class); final Path methodPathAnnotation = method.getAnnotation(Path.class); CreationFactory creationFactory = createCreationFactory(baseURI, pathParameterValues, classPathAnnotation, creationFactoryAnnotation, methodPathAnnotation); return creationFactory; } private  ServiceProviderFactory(); static ServiceProvider createServiceProvider(final String baseURI, final String genericBaseURI, final String title, final String description, final Publisher publisher, final Class<?>[] resourceClasses); static ServiceProvider createServiceProvider(final String baseURI, final String genericBaseURI, final String title, final String description, final Publisher publisher, final Class<?>[] resourceClasses, final Map<String,Object> pathParameterValues); static ServiceProvider initServiceProvider(final ServiceProvider serviceProvider, final String baseURI, final String genericBaseURI, final String title, final String description, final Publisher publisher, final Class<?>[] resourceClasses, final Map<String,Object> pathParameterValues); }
ServiceProviderFactory { static CreationFactory createCreationFactory(final String baseURI, final Map<String, Object> pathParameterValues, final Method method) throws URISyntaxException { final Path classPathAnnotation = method.getDeclaringClass().getAnnotation(Path.class); final OslcCreationFactory creationFactoryAnnotation = method.getAnnotation( OslcCreationFactory.class); final Path methodPathAnnotation = method.getAnnotation(Path.class); CreationFactory creationFactory = createCreationFactory(baseURI, pathParameterValues, classPathAnnotation, creationFactoryAnnotation, methodPathAnnotation); return creationFactory; } private  ServiceProviderFactory(); static ServiceProvider createServiceProvider(final String baseURI, final String genericBaseURI, final String title, final String description, final Publisher publisher, final Class<?>[] resourceClasses); static ServiceProvider createServiceProvider(final String baseURI, final String genericBaseURI, final String title, final String description, final Publisher publisher, final Class<?>[] resourceClasses, final Map<String,Object> pathParameterValues); static ServiceProvider initServiceProvider(final ServiceProvider serviceProvider, final String baseURI, final String genericBaseURI, final String title, final String description, final Publisher publisher, final Class<?>[] resourceClasses, final Map<String,Object> pathParameterValues);  }