@Test
public void testGetFailedTransactionsCount() throws Exception {

    //let us increment some transactions count and then check
    shardStats.incrementFailedTransactionsCount();
    shardStats.incrementFailedTransactionsCount();
    //now let us get from MBeanServer what is the transaction count.
    Object attribute =
        mbeanServer.getAttribute(testMBeanName, "FailedTransactionsCount");
    Assert.assertEquals(attribute, 2L);
}