TimeStampRequestGenerator generator = new TimeStampRequestGenerator();
TimeStampRequest timeStampRequest = generator.generate(
TSPAlgorithms.SHA1, DigestHelper.digest("this is a test message"));
TimeStampResponse response = null;
response = new Timestamper(keystore).timestamp(timeStampRequest);
Assert.assertNotNull("Timestamp Response should not be null", response);
Assert.assertNotNull("Timestamp token should not be null", response.getTimeStampToken());
response.validate(timeStampRequest);
}