    @Test
    public void testFindProfileSpec() throws JSONException {

        DevicePluginContext pluginContext = Mockito.mock(DevicePluginContext.class);

        String jsonString = FileLoader.readString("testProfile.json");

        DConnectServiceSpec spec = new DConnectServiceSpec(pluginContext);
        spec.addProfileSpec("testProfile", jsonString);

        Operation operation = spec.findOperationSpec(Method.GET, "/gotapi/testProfile");
        assertThat(operation, is(notNullValue()));

        operation = spec.findOperationSpec(Method.GET, "/gotapi/testProfile/");
        assertThat(operation, is(notNullValue()));

        operation = spec.findOperationSpec(Method.GET, "/gotapi/testProfile/a0");
        assertThat(operation, is(notNullValue()));

        operation = spec.findOperationSpec(Method.GET, "/gotapi/testProfile/a0/");
        assertThat(operation, is(notNullValue()));

        operation = spec.findOperationSpec(Method.GET, "/gotapi/testProfile/a1");
        assertThat(operation, is(notNullValue()));

        operation = spec.findOperationSpec(Method.GET, "/gotapi/testProfile/a1/");
        assertThat(operation, is(notNullValue()));
    }