@Test public void testInvalidErrorThreshold() throws Throwable { String resourcePool = UUID.randomUUID().toString(); ResourceAllocationTaskState startState = createAllocationRequest(resourcePool, "http://computeDescription", null, null); startState.errorThreshold = -1; host.postServiceSynchronously( ResourceAllocationTaskFactoryService.SELF_LINK, startState, ResourceAllocationTaskState.class, IllegalArgumentException.class); }