### Question:
MonitorManager { public void getState(final String physicalMachineAddress, final Type type, final String virtualMachineName) throws MonitorException { AbstractMonitor monitor = findRunningMonitor(physicalMachineAddress, type); if (monitor != null) { LOGGER.info("Getting state of virtual machine {} on {}", virtualMachineName, physicalMachineAddress); monitor.publishState(physicalMachineAddress, virtualMachineName); } else { throw new MonitorException(String.format("Machine %s doesn't have a running monitor", physicalMachineAddress)); } } MonitorManager(); PhysicalMachine monitor(final String physicalMachineAddress, final Type type,
        final String username, final String password); void createAndStartMonitor(final String physicalMachineAddress, final Type type,
        final String username, final String password); void shutdown(final String physicalMachineAddress, final Type type); void stopAllMonitors(); VirtualMachine subscribe(final String physicalMachineAddress, final Type type,
        final String virtualMachineName); void unsubscribe(final String physicalMachineAddress, final Type type,
        final String virtualMachineName); void getState(final String physicalMachineAddress, final Type type,
        final String virtualMachineName); void invalidateLastKnownState(final String physicalMachineAddress, final Type type,
        final String virtualMachineName);  }### Answer:
@Test(expectedExceptions = MonitorException.class) public void test_getStateOfUnexistingMachine() throws Exception { monitorManager.getState("10.60.1.78", SingleMachineMonitor.TYPE, UUID.randomUUID() .toString()); }