I was getting failures when running the sample code, which turned out to be an incorrect timezone in the date stamp. Forcing the timezone to UTC in getDate() in Authenticator.java fixes the problem, e.g.
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
formatter.setTimeZone(TimeZone.getTimeZone("UTC"));
return formatter.format(new Date());