### Question:
PhysicalMachineResource extends AbstractResource { @DELETE @Path(PHYSICALMACHINE_PATH) public void shutdown(@PathParam(PHYSICALMACHINE_PARAM) String physicalMachineId) { checkSystem(); physicalMachineId = decodeParameter(physicalMachineId); PhysicalMachine pm = dao.getPhysicalMachine(Integer.valueOf(physicalMachineId)); if (pm == null) { throw new VSMException(Status.NOT_FOUND, "There is no monitored machine with id " + physicalMachineId); } vsmService.shutdown(pm.getAddress(), pm.getType()); } PhysicalMachineResource(); @GET PhysicalMachinesDto getMonitoredMachines(
        @QueryParam(ADDRESS_QUERY_PARAM) String physicalMachineAddress); @POST PhysicalMachineDto monitor(final PhysicalMachineDto physicalMachine,
        @HeaderParam(AUTH_HEADER) final String auth); @DELETE @Path(PHYSICALMACHINE_PATH) void shutdown(@PathParam(PHYSICALMACHINE_PARAM) String physicalMachineId); @GET @Path(VIRTUALMACHINE_PATH) void getState(@PathParam(PHYSICALMACHINE_PARAM) String physicalMachineId,
        @PathParam(VIRTUALMACHINE_PARAM) String virtualMachineName); @DELETE @Path(VIRTUALMACHINE_PATH) void invalidateLastKnownState(
        @PathParam(PHYSICALMACHINE_PARAM) String physicalMachineId,
        @PathParam(VIRTUALMACHINE_PARAM) String virtualMachineName); static final String PHYSICALMACHINES_PATH; static final String PHYSICALMACHINE_PARAM; static final String PHYSICALMACHINE_PATH; static final String VIRTUALMACHINE_PARAM; static final String VIRTUALMACHINE_PATH; }### Answer:
@Test public void test_shutdownUnexisting() { try { pmResource.shutdown("15"); fail("Physical machine with id 15 should not exist"); } catch (VSMException ex) { assertEquals(ex.getResponse().getStatus(), Status.NOT_FOUND.getStatusCode()); } }