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

    // Prepare
    when(mockVpcDao.acquireInLockTable(VPC_ID)).thenReturn(null);
    // Execute
    try {
        deployment.lock();
    } finally {
        // Assert
        verify(mockVpcDao, times(1)).acquireInLockTable(VPC_ID);
        assertNull(deployment.tableLockId);
    }
}