### Question:
RouterDeploymentDefinition { protected void unlock() { if (tableLockId != null) { networkDao.releaseFromLockTable(tableLockId); if (logger.isDebugEnabled()) { logger.debug("Lock is released for network id " + tableLockId + " as a part of router startup in " + dest); } } } protected  RouterDeploymentDefinition(final Network guestNetwork, final DeployDestination dest,
                                         final Account owner, final Map<Param, Object> params); Long getServiceOfferingId(); Vpc getVpc(); Network getGuestNetwork(); DeployDestination getDest(); Account getOwner(); Map<Param, Object> getParams(); boolean isRedundant(); DeploymentPlan getPlan(); boolean isVpcRouter(); Pod getPod(); Long getPodId(); List<DomainRouterVO> getRouters(); VirtualRouterProvider getVirtualProvider(); boolean isBasic(); boolean isPublicNetwork(); PublicIp getSourceNatIP(); boolean needsPublicNic(); boolean hasSourceNatService(); List<DomainRouterVO> deployVirtualRouter();  }### Answer:
@Test public void testUnlock() { deployment.tableLockId = NW_ID_1; deployment.unlock(); verify(mockNwDao, times(1)).releaseFromLockTable(NW_ID_1); }
@Test public void testUnlockWithoutLock() { deployment.tableLockId = null; deployment.unlock(); verify(mockNwDao, times(0)).releaseFromLockTable(anyLong()); }