public void testAtomPostBlogComment() throws Exception {
RestClient client = new RestClient();
Resource resource = client.resource(BASE_URI+"/blogs/0/entries/1/comments");
AtomEntry entry = new AtomEntry();
AtomPerson author = new AtomPerson();
author.setName("Wink Coder");
author.setEmail("winkcoder@mybusiness.com");
entry.getAuthors().add(author);
AtomContent content = new AtomContent();
content.setType("String");
content.setValue("I was able to set up the Wink development environment!");
entry.setContent(content);
entry.setTitle(new AtomText(("Success")));
ClientResponse uri = resource.accept("application/atom+xml").contentType("application/atom+xml").post(entry);
String location = uri.getHeaders().getFirst("Location");
assertEquals(BASE_URI+"/blogs/0/entries/1/comments/1", location);
resource = client.resource(location);
AtomEntry postedEntry = resource.accept("application/atom+xml").get(AtomEntry.class);
author = postedEntry.getAuthors().get(0);
assertNotNull(author);
assertEquals("Wink Coder", author.getName());
assertEquals("winkcoder@mybusiness.com", author.getEmail());
assertEquals("I was able to set up the Wink development environment!", entry.getContent().getValue());
assertEquals("Success", entry.getTitle().getValue());
resource = client.resource(BASE_URI+"/blogs/0/entries/1");
entry = resource.accept("application/atom+xml").get(AtomEntry.class);