@@ -0,0 +1,1123 @@
+package cl.fatman.capital.fund;%0A%0Aimport static org.hamcrest.Matchers.*;%0A%0Aimport static org.junit.Assert.*;%0Aimport org.junit.AfterClass;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0A%0Aimport java.time.LocalDate;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Apublic class ControllerTest %7B%0A%09%0A%09private static Controller control;%0A%09private static PersistenceData persistence;%0A%09%0A%09@BeforeClass%0A%09public static void setUp() %7B%0A%09%09control = Controller.getInstance();%0A%09%09control.setUp();%0A%09%09List%3CFundType%3E ftList = new ArrayList%3CFundType%3E();%0A%09%09FundType type = new FundType(1, %22Deuda %3C 90 d%C3%ADas%22);%0A%09%09ftList.add(type);%0A%09%09persistence = PersistenceData.getInstance();%0A%09%09persistence.insertObjectList(ftList);%0A%09%7D%0A%09%0A%09@AfterClass%0A%09public static void tearDown() %7B%0A%09%09control.tearDown();%0A%09%7D%0A%09%0A%09@Test%0A%09public void storeFundDataTest() %7B%0A%09%09LocalDate endDate = LocalDate.now();%0A%09%09LocalDate startDate = endDate.minusDays(3);%0A%09%09control.storeFundData(startDate, endDate);%0A%09%09List%3C?%3E rList = persistence.selectAllObjects(%22from FundRate%22, FundRate.class);%0A%09%09assertThat(%22Fund rate list should be greater than 0.%22, rList.size(), greaterThan(0));%0A%09%7D%0A%7D

Create a junit test for the Controller class. Test the method that load the fund data in the data base, the pass criteria is that the fund rate list should be greater than 0.