public static RestSettingBuilder get(final String id) {
        return get(eq(checkId(id)));
    }
@Test
    public void should_get_all_resources() 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().response(json(ImmutableList.of(resource1, resource2)))
        );

        running(server, () -> {
            String uri = "/targets";
            List<Plain> plains = getResources(uri);
            assertThat(plains.size(), is(2));
        });
    }