@@ -0,0 +1,1973 @@
+package org.croudtrip.account;%0A%0A%0Aimport org.croudtrip.api.account.User;%0Aimport org.croudtrip.api.account.Vehicle;%0Aimport org.croudtrip.api.account.VehicleDescription;%0Aimport org.croudtrip.db.VehicleDAO;%0Aimport org.junit.Assert;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0A%0Aimport mockit.Mocked;%0Aimport mockit.Verifications;%0Aimport mockit.integration.junit4.JMockit;%0A%0A@RunWith(JMockit.class)%0Apublic class VehicleManagerTest %7B%0A%0A%09@Mocked VehicleDAO vehicleDAO;%0A%0A%09private VehicleManager vehicleManager;%0A%09private final User owner = new User(0, %22owner%22, null, null, null, false, null, null, null, 0);%0A%09private final VehicleDescription vehicleDescription = new VehicleDescription(%22plate%22, %22color%22, %22type%22, 5);%0A%0A%0A%09@Before%0A%09public void setupManager() %7B%0A%09%09vehicleManager = new VehicleManager(vehicleDAO);%0A%09%7D%0A%0A%0A%09@Test%0A%09public void testAddVehicle() %7B%0A%09%09final Vehicle vehicle = vehicleManager.addVehicle(owner, vehicleDescription);%0A%09%09assertEquals(vehicle, vehicleDescription);%0A%0A%09%09new Verifications() %7B%7B%0A%09%09%09vehicleDAO.save(vehicle);%0A%09%09%7D%7D;%0A%09%7D%0A%0A%0A%09@Test%0A%09public void testUpdateVehicle() %7B%0A%09%09final Vehicle oldVehicle = new Vehicle(0, %22%22, %22%22, %22%22, 1, owner);%0A%09%09final Vehicle updatedVehicle = vehicleManager.updateVehicle(owner, oldVehicle, vehicleDescription);%0A%09%09assertEquals(updatedVehicle, vehicleDescription);%0A%0A%09%09new Verifications() %7B%7B%0A%09%09%09vehicleDAO.update(updatedVehicle);%0A%09%09%7D%7D;%0A%09%7D%0A%0A%0A%09@Test%0A%09public void testFindAllVehicles() %7B%0A%09%09vehicleManager.findAllVehicles(owner);%0A%09%09new Verifications() %7B%7B%0A%09%09%09vehicleDAO.findByUserId(owner.getId());%0A%09%09%7D%7D;%0A%09%7D%0A%0A%0A%09private void assertEquals(Vehicle vehicle, VehicleDescription vehicleDescription) %7B%0A%09%09Assert.assertEquals(vehicle.getLicensePlate(), vehicleDescription.getLicensePlate());%0A%09%09Assert.assertEquals(vehicle.getColor(), vehicleDescription.getColor());%0A%09%09Assert.assertEquals(vehicle.getType(), vehicleDescription.getType());%0A%09%09Assert.assertEquals(vehicle.getCapacity(), vehicleDescription.getCapacity());%0A%09%7D%0A%0A%7D

add VehicleManagerTest