@Test
public void testDecodePut() throws Exception {

    DefaultResourceRequest decoded = decode(HttpMethod.PUT, "/memory/people/bob", "{ name: 'bob', int: 1024, maxInt: 2147483647, minInt: -2147483648, longNeg: -2147483659, longPos: 2147483648  }");
    assertThat(decoded.requestType()).isEqualTo(RequestType.UPDATE);
    assertThat(decoded.resourcePath().segments()).hasSize(3);
    assertThat(decoded.resourcePath().segments().get(0).name()).isEqualTo("memory");
    assertThat(decoded.resourcePath().segments().get(1).name()).isEqualTo("people");
    assertThat(decoded.resourcePath().segments().get(2).name()).isEqualTo("bob");
    //assertThat(decoded.mediaType()).isEqualTo(MediaType.JSON);
    assertThat(decoded.requestContext().pagination()).isNotNull();
    assertThat(decoded.requestContext().pagination()).isEqualTo(Pagination.NONE);
    assertThat(decoded.state()).isNotNull();
    assertThat(decoded.state()).isInstanceOf(ResourceState.class);
    ResourceState state = decoded.state();
    assertThat(state.getProperty("name")).isEqualTo("bob");
    assertThat(state.getProperty("int")).isEqualTo(1024);
    assertThat(state.getProperty("maxInt")).isEqualTo(2147483647);
    assertThat(state.getProperty("minInt")).isEqualTo(-2147483648);
    assertThat(state.getProperty("longNeg")).isEqualTo(-2147483659L);
    assertThat(state.getProperty("longPos")).isEqualTo(2147483648L);
}