### Question:
World { public void update() { lastUpdateStarted = System.currentTimeMillis(); synchronized (worldObjects) { worldObjects.refresh(); worldObjects.forEach(WorldObject::preUpdate); worldObjects.forEach(WorldObject::update); worldObjects.forEach(WorldObject::postUpdate); } lastUpdateCompleted = System.currentTimeMillis(); } World();  World(Zone... zones); WorldObjectList getWorldObjects(); void update(); Map<Integer, Zone> getZones(); long getLastUpdateCompleted(); long getLastUpdateStarted();  }### Answer:
@Test public void testUpdate() { WorldObject worldObject = mock(WorldObject.class); when(worldObject.getVector2D()).thenReturn(Vector2D.ORIGIN); World world = WorldUtils.createDefaultWorld(); world.getWorldObjects().add(worldObject); world.update(); verify(worldObject, times(1)).preUpdate(); verify(worldObject, times(1)).update(); verify(worldObject, times(1)).postUpdate(); }