XenHypervisor implements HypervisorHost { protected void disableAndShutdownHost(Connection conn, Host host) throws BadServerResponse, XenAPIException, XmlRpcException { host.disable(conn); host.shutdown(conn); }  @Override void shutdownHost(HostVO hostVo); @Override boolean supportsHypervisor(HypervisorType hypervisorType);  }
@Test public void disableAndShutdownHostTest() throws Exception { Mockito.doNothing().when(host).disable(conn); Mockito.doNothing().when(host).shutdown(conn); xenHypervisor.disableAndShutdownHost(conn, host); InOrder inOrder = Mockito.inOrder(host); inOrder.verify(host).disable(Mockito.any(Connection.class)); inOrder.verify(host).shutdown(Mockito.any(Connection.class)); }