@Test
public void testResourceAsXml() throws Exception {

    WebResource webResource = resource();
    Bookstore response = webResource.accept("application/xml").get(Bookstore.class);
    assertNotNull("Should have returned a bookstore!", response);
    assertEquals("bookstore name", "Czech Bookstore", response.getName());
}