### Question:
VelocityController { public void addWayEntry(WayEntry newEntry) { if (newEntry == null) { throw new NullPointerException("newEntry is null"); } wayEntries.add(newEntry); } VelocityController(int maxDecel,
                            int maxAccel,
                            int maxRevVelo,
                            int maxFwdVelo); int getMaxDeceleration(); void setMaxDeceleration(int maxDeceleration); int getMaxAcceleration(); void setMaxAcceleration(int maxAcceleration); int getMaxRevVelocity(); void setMaxRevVelocity(int maxRevVelocity); int getMaxFwdVelocity(); void setMaxFwdVelocity(int maxFwdVelocity); boolean isVehiclePaused(); void setVehiclePaused(boolean pause); void addVelocityListener(VelocityListener listener); void removeVelocityListener(VelocityListener listener); int getCurrentVelocity(); int getCurrentPosition(); long getCurrentTime(); void addWayEntry(WayEntry newEntry); WayEntry getCurrentWayEntry(); boolean hasWayEntries(); void advanceTime(int dt);  }### Answer:
@Test(expected = NullPointerException.class) public void testAddNullWayEntryShouldThrowException() { VelocityController controller = new VelocityController(MAX_DECEL, MAX_ACCEL, MAX_REV_VELO, MAX_FWD_VELO); controller.addWayEntry(null); }