ServerStatus { public synchronized void complete(long taskId) throws IllegalArgumentException { TaskStatus status = tasks.remove(taskId); if (status == null) { throw new IllegalArgumentException("TaskId is not in map:"+taskId); } } ServerStatus();  ServerStatus(boolean isLegacy); synchronized long start(TASK task, String fileName); synchronized void complete(long taskId); synchronized void setStatus(STATUS status); synchronized STATUS getStatus(); synchronized Map<Long, TaskStatus> getTasks(); synchronized long getFilesProcessed(); long getMillisSinceLastParseStarted(); synchronized boolean isOperating();  }
@Test(expected = IllegalArgumentException.class) public void testBadId() throws Exception { ServerStatus status = new ServerStatus(); status.complete(2); }