@@ -0,0 +1,2314 @@
+package umm3601.plant;%0A%0Aimport com.google.gson.Gson;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport umm3601.digitalDisplayGarden.PlantController;%0A%0Aimport java.io.IOException;%0A%0Aimport static junit.framework.TestCase.assertEquals;%0A%0Apublic class TestPlantByPlantId %7B%0A    private final static String databaseName = %22data-for-testing-only%22;%0A    private PlantController plantController;%0A%0A    @Before%0A    public void populateDB() throws IOException %7B%0A        PopulateMockDatabase db = new PopulateMockDatabase();%0A        db.clearAndPopulateDBAgain();%0A        plantController = new PlantController(databaseName);%0A    %7D%0A%0A    @Test%0A    public void GetPlantByPlantIdExist() throws IOException %7B%0A//        Gson gson = new Gson();%0A        String expect1 = %22%7B %5C%22_id%5C%22 : %7B %5C%22$oid%5C%22 : %5C%2258d1c36efb0cac4e15afd202%5C%22 %7D, %5C%22commonName%5C%22 : %5C%22Alternanthera%5C%22, %5C%22cultivar%5C%22 : %5C%22Experimental%5C%22 %7D%22;%0A        String plant1 = plantController.getPlantByPlantID(%2216001.0%22, %22first uploadId%22);%0A        String expect2 = %22%7B %5C%22_id%5C%22 : %7B %5C%22$oid%5C%22 : %5C%2258d1c36efb0cac4e15afd203%5C%22 %7D, %5C%22commonName%5C%22 : %5C%22Begonia%5C%22, %5C%22cultivar%5C%22 : %5C%22Megawatt Rose Green Leaf%5C%22 %7D%22;%0A        String plant2 = plantController.getPlantByPlantID(%2216008.0%22, %22first uploadId%22);%0A        String expect3 = %22%7B %5C%22_id%5C%22 : %7B %5C%22$oid%5C%22 : %5C%2258d1c36efb0cac4e15afd204%5C%22 %7D, %5C%22commonName%5C%22 : %5C%22Dianthus%5C%22, %5C%22cultivar%5C%22 : %5C%22Jolt%E2%84%A2 Pink F1%5C%22 %7D%22;%0A        String plant3 = plantController.getPlantByPlantID(%2216040.0%22, %22second uploadId%22);%0A%0A        // For some reason, this creates a new object id for the plant even though there is already one.%0A        // plant = gson.fromJson(json, Plant.class);%0A        assertEquals(%22Incorrect plant%22, expect1, plant1);%0A        assertEquals(%22Incorrect plant%22, expect2, plant2);%0A        assertEquals(%22Incorrect plant%22, expect3, plant3);%0A    %7D%0A%0A    @Test%0A    public void GetPlantByPlantIdDE() throws IOException %7B%0A        String plant1 = plantController.getPlantByPlantID(%2216001.0%22, %22second uploadId%22);%0A        String plant2 = plantController.getPlantByPlantID(%2216008.0%22, %22second uploadId%22);%0A        String plant3 = plantController.getPlantByPlantID(%2216040.0%22, %22first uploadId%22);%0A%0A        assertEquals(%22Incorrect plant%22, %22null%22, plant1);%0A        assertEquals(%22Incorrect plant%22, %22null%22, plant2);%0A        assertEquals(%22Incorrect plant%22, %22null%22, plant3);%0A    %7D%0A%7D%0A

Add tests for 'getPlantByPlantID' in 'PlantController.java'