### Question:
JobQueue { public JobQueue(MapViewPosition mapViewPosition, DisplayModel displayModel) { this.mapViewPosition = mapViewPosition; this.displayModel = displayModel; } JobQueue(MapViewPosition mapViewPosition, DisplayModel displayModel); synchronized void add(T job); synchronized T get(); synchronized void notifyWorkers(); synchronized void remove(T job); synchronized int size();  }### Answer:
@Test public void jobQueueTest() throws InterruptedException { MapViewPosition mapViewPosition = new MapViewPosition(new FixedTileSizeDisplayModel(256)); JobQueue<Job> jobQueue = new JobQueue<Job>(mapViewPosition, new FixedTileSizeDisplayModel(256)); Assert.assertEquals(0, jobQueue.size()); Tile tile1 = new Tile(0, 0, (byte) 1); Tile tile2 = new Tile(0, 0, (byte) 0); Tile tile3 = new Tile(0, 0, (byte) 2); Job job1 = new Job(tile1, 1, false); Job job2 = new Job(tile2, 1, false); Job job3 = new Job(tile3, 1, false); jobQueue.add(job1); jobQueue.add(job2); jobQueue.add(job3); Assert.assertEquals(3, jobQueue.size()); jobQueue.add(job1); Assert.assertEquals(3, jobQueue.size()); jobQueue.notifyWorkers(); Assert.assertEquals(job2, jobQueue.get()); Assert.assertEquals(job1, jobQueue.get()); Assert.assertEquals(job3, jobQueue.get()); Assert.assertEquals(0, jobQueue.size()); jobQueue.remove(job1); jobQueue.remove(job2); jobQueue.remove(job3); verifyInvalidRemove(jobQueue, job1); verifyInvalidRemove(jobQueue, job2); verifyInvalidRemove(jobQueue, job3); }