@Test
public void optionsValidation() throws Throwable {

    ExampleServiceState body = new ExampleServiceState();
    body.name = UUID.randomUUID().toString();
    body.documentSelfLink = UUID.randomUUID().toString();
    Operation post = Operation
            .createPost(UriUtils.buildFactoryUri(this.host, ExampleService.class))
            .setCompletion(this.host.getCompletion())
            .setBody(body);
    this.host.testStart(1);
    this.host.send(post);
    this.host.testWait();
    URI childServiceUri = UriUtils.buildUri(this.host.getUri(),
            ExampleService.FACTORY_LINK, body.documentSelfLink);
    // get service options, verify they make sense
    URI configUri = UriUtils.buildConfigUri(childServiceUri);
    ServiceConfiguration cfg = this.host.getServiceState(null, ServiceConfiguration.class,
            configUri);
    assertTrue(cfg.options.contains(ServiceOption.CONCURRENT_GET_HANDLING));
    // now verify a stateful but not persisted service
    childServiceUri = UriUtils.buildUri(this.host, UUID.randomUUID().toString());
    this.host.startService(Operation.createPost(childServiceUri),
            new DefaultHandlerTestService());
    String uriPath = childServiceUri.getPath();
    this.host.waitForServiceAvailable(uriPath);
    configUri = UriUtils.buildConfigUri(childServiceUri);
    cfg = this.host.getServiceState(null, ServiceConfiguration.class,
            configUri);
    assertTrue(!cfg.options.contains(ServiceOption.CONCURRENT_GET_HANDLING));
}