VehicleRepositoryImpl implements VehicleRepository { @Override public void removeAll() { repository.deleteAll(); } VehicleRepositoryImpl(VehicleCrudRepository repository); @Override Vehicle createVehicle(int capacity); @Override Vehicle createVehicle(VehicleData vehicleData); @Override List<Vehicle> vehicles(); @Override Vehicle removeVehicle(long id); @Override void removeAll(); @Override Optional<Vehicle> find(long vehicleId); @Override void update(Vehicle vehicle);  }
@Test void remove_all_vehicles() { repository.removeAll(); verify(crudRepository).deleteAll(); }