use of com.cloud.legacymodel.network.VirtualRouter in project cosmic by MissionCriticalCloud.
the class NetworkHelperImplTest method testSendCommandsToRouterWrongRouterVersion.
@Test(expected = ResourceUnavailableException.class)
public void testSendCommandsToRouterWrongRouterVersion() throws AgentUnavailableException, OperationTimedoutException, ResourceUnavailableException {
// Prepare
final NetworkHelperImpl nwHelperUT = spy(this.nwHelper);
final VirtualRouter vr = mock(VirtualRouter.class);
doReturn(false).when(nwHelperUT).checkRouterVersion(vr);
// Execute
nwHelperUT.sendCommandsToRouter(vr, null);
// Assert
verify(this.agentManager, times(0)).send((Long) Matchers.anyObject(), (Command) Matchers.anyObject());
}
Aggregations