@Test
public void transactionStatisticsTest() throws Exception {

  Map<String, Long> statistics = new HashMap<>();
  statistics.put("COMMITTED", 1l);
  statistics.put("SUSPENDED", 2l);
  statistics.put("COMPENSATED", 3l);
  when(transactionRepository.getTransactionStatistics()).thenReturn(statistics);
  mockMvc.perform(get("/alpha/api/v1/transaction/statistics"))
      .andExpect(status().isOk())
      .andExpect(
          MockMvcResultMatchers.content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))
      .andExpect(jsonPath("$.COMMITTED").value(statistics.get("COMMITTED")))
      .andExpect(jsonPath("$.SUSPENDED").value(statistics.get("SUSPENDED")))
      .andExpect(jsonPath("$.COMPENSATED").value(statistics.get("COMPENSATED")))
      .andReturn();
}