public void testPostOnDataResource() {
Form formData = new Form();
formData.add("name", "testName");
formData.add("value", "testValue");
WebResource webResource = resource();
ClientResponse response = webResource.path("data")
.type(MediaType.APPLICATION_FORM_URLENCODED)
.post(ClientResponse.class, formData);
assertEquals(Response.Status.OK, response.getResponseStatus());
String responseMsg = webResource.path("data").type(MediaType.TEXT_HTML).get(String.class);
assertTrue("Submitted data did not get added to the list...",
responseMsg.contains("testName") && responseMsg.contains("testValue"));
}