@Test
public void testExists() throws Exception {

    ActorRef actorRef = setupActorContextWithInitialCreateTransaction(getSystem(), READ_ONLY);
    TransactionProxy transactionProxy = new TransactionProxy(mockComponentFactory, READ_ONLY);
    doReturn(dataExistsReply(false)).when(mockActorContext).executeOperationAsync(
            eq(actorSelection(actorRef)), eqDataExists(), any(Timeout.class));
    Boolean exists = transactionProxy.exists(TestModel.TEST_PATH).get();
    assertEquals("Exists response", Boolean.FALSE, exists);
    doReturn(dataExistsReply(true)).when(mockActorContext).executeOperationAsync(
            eq(actorSelection(actorRef)), eqDataExists(), any(Timeout.class));
    exists = transactionProxy.exists(TestModel.TEST_PATH).get();
    assertEquals("Exists response", Boolean.TRUE, exists);
}