@Test
public void testFindGlobalTransactionWhenGlobalTxExist() {

    // Setup
    final String id = "id";
    final GlobalTransaction globalTransaction = mock(GlobalTransaction.class);
    when(mockGlobalTransactionRepository.findOne(id)).thenReturn(globalTransaction);
    // Run the test
    final Optional<GlobalTransaction> result = businessGlobalTransactionServiceImplUnderTest.findGlobalTransaction(id);
    // Verify the results
    assertEquals(Optional.of(globalTransaction), result);
}