@Test
public void should_post_B() throws Exception {

    HttpRequest httpRequest = server.client().authenticatedAs("admin")
            .POST("/api/polymorphic")
            .contentType("application/json")
            .send("{\"@class\":\".PolymorphicResource$B\",\"a\":\"a3\",\"b\":\"b\"}");
    assertThat(httpRequest.code()).isEqualTo(200);
    assertThat(httpRequest.body().trim()).isEqualTo("{\n" +
            "  \"@class\" : \".PolymorphicResource$B\",\n" +
            "  \"a\" : \"a3\",\n" +
            "  \"b\" : \"b\"\n" +
            "}");
}