public static RestSettingBuilder get(final String id) {
        return get(eq(checkId(id)));
    }
@Test
    public void should_get_resource_by_id() throws Exception {
        Plain resource1 = new Plain();
        resource1.code = 1;
        resource1.message = "hello";

        Plain resource2 = new Plain();
        resource2.code = 2;
        resource2.message = "world";

        server.resource("targets",
                get("1").response(json(resource1)),
                get("2").response(json(resource2))
        );

        running(server, () -> {
            Plain response1 = getResource("/targets/1");
            assertThat(response1.code, is(1));
            assertThat(response1.message, is("hello"));

            Plain response2 = getResource("/targets/2");
            assertThat(response2.code, is(2));
            assertThat(response2.message, is("world"));
        });
    }