//This test case might fail
//because Google blogger service has limitation on new posts allowed everyday/every hour?
//System.out.println("testClientDelete");
//We create a new post, and then delete it
Entry newEntry = new Entry();
newEntry.setTitle(new PlainTextConstruct("contactEntryShouldNotApear"));
newEntry.setContent(new PlainTextConstruct("contactByBloggerShouldNotAppear"));
Entry postedEntry = testService.clientPost(newEntry);
Thread.sleep(Constants.SLEEP_INTERVAL);
//System.out.println("ID: " + postedEntry.getId());
int idStartPosition = postedEntry.getId().lastIndexOf("/");
String postedEntryID = postedEntry.getId().substring(idStartPosition+1);
//System.out.println("postedEntryID: " + postedEntryID );
//Before deletion
for (int i = 0; i < 5; i++) { // make 5 attempts because of timing issues
try {
Entry entry00 = testService.clientGetEntry(postedEntryID);
//System.out.println("Before Deletion: " + entry00.getId());
break; // get was successful
} catch (Exception e) {
if (i < 4) {
System.out.println("Get failed, retrying...");