@Test(expected = ConcurrentOperationException.class)
public void testLockFails() {

    // Prepare
    when(mockNwDao.acquireInLockTable(NW_ID_1, NetworkOrchestrationService.NetworkLockTimeout.value()))
    .thenReturn(null);
    // Execute
    try {
        deployment.lock();
    } finally {
        // Assert
        verify(mockNwDao, times(1)).acquireInLockTable(NW_ID_1, 600);
        assertNull(deployment.tableLockId);
    }
}