@Test
public void testGetLastCommittedTransactionTime() throws Exception {

    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
    Assert.assertEquals(shardStats.getLastCommittedTransactionTime(),
        sdf.format(new Date(0L)));
    long millis = System.currentTimeMillis();
    shardStats.setLastCommittedTransactionTime(millis);
    //now let us get from MBeanServer what is the transaction count.
    Object attribute = mbeanServer.getAttribute(testMBeanName,
        "LastCommittedTransactionTime");
    Assert.assertEquals(attribute, sdf.format(new Date(millis)));
    Assert.assertNotEquals(attribute,
        sdf.format(new Date(millis - 1)));
}