    @Test
    public void testPutSynchronous() throws Exception {

        WriteTransaction transaction = mock(WriteTransaction.class);
        doReturn(CommitInfo.emptyFluentFuture()).when(transaction).commit();
        InstanceIdentifier identifier = mock(InstanceIdentifier.class);
        DataObject dataObject = mock(DataObject.class);

        when(transactionChain.newWriteOnlyTransaction()).thenReturn(transaction);
        assertTrue(access.putSynchronous(identifier, dataObject, LogicalDatastoreType.OPERATIONAL));

        verify(transaction).put(LogicalDatastoreType.OPERATIONAL, identifier, dataObject);

        doReturn(FluentFutures.immediateFailedFluentFuture(new ExecutionException(new NullPointerException())))
                .when(transaction).commit();
        assertFalse(access.putSynchronous(identifier, dataObject, LogicalDatastoreType.OPERATIONAL));
    }