### Question:
MyResource { @POST @Path("index") @Consumes("text/plain") public String postSimple(int index) { return RESPONSE[index % 3]; }  @POST @Consumes(MyObject.MIME_TYPE) String postWithCustomMimeType(MyObject myObject); @POST @Path("index") @Consumes("text/plain") String postSimple(int index);  }### Answer:
@Test public void testPostSimple() { String fruit = target .path("index") .request() .post(Entity.text("1"), String.class); assertEquals("banana", fruit); }