public static RestSettingBuilder get(final String id) {
        return get(eq(checkId(id)));
    }
@Test
    public void should_get_resource_by_id_with_request_config() 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").request(eq(header(HttpHeaders.CONTENT_TYPE), "application/json")).response(json(resource1)),
                get("2").request(eq(header(HttpHeaders.CONTENT_TYPE), "application/json")).response(json(resource2))
        );

        running(server, () -> {
            ClassicHttpResponse response = helper.getResponseWithHeader(remoteUrl("/targets/1"),
                    of(HttpHeaders.CONTENT_TYPE, "application/json"));
            Plain response1 = asPlain(response);
            assertThat(response1.code, is(1));
            assertThat(response1.message, is("hello"));

            ClassicHttpResponse otherResponse = helper.getResponseWithHeader(remoteUrl("/targets/2"),
                    of(HttpHeaders.CONTENT_TYPE, "application/json"));
            Plain response2 = asPlain(otherResponse);
            assertThat(response2.code, is(2));
            assertThat(response2.message, is("world"));

            HttpResponse notFoundResponse = helper.getResponse(remoteUrl("/targets/1"));
            assertThat(notFoundResponse.getCode(), is(404));
        });
    }