package com.bonus.lease.controller; import java.util.HashMap; import java.util.Map; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.bonus.lease.beans.LeaseApplicationBean; import com.bonus.lease.service.LeaseApplicationService; import com.bonus.sys.Page; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = "classpath:spring/spring-application.xml") public class LeaseApplicationControllerTest { @Autowired private LeaseApplicationService service; @Test public void testfindByPage() { LeaseApplicationBean o = new LeaseApplicationBean(); Page page = new Page<>(); try { String companyId = "11"; o.setCompanyId(companyId); Page station = service.findByPage(o, page); Map p = new HashMap(); p.put("list", station); } catch (Exception e) { } } }