### Question:
MapperUtils { public static <T extends Serializable> T map(SqlToyContext sqlToyContext, Serializable source, Class<T> resultType) throws Exception { if (source == null || resultType == null) { return null; } List<Serializable> sourceList = new ArrayList<Serializable>(); sourceList.add(source); List<T> result = mapList(sqlToyContext, sourceList, resultType); return result.get(0); }  static T map(SqlToyContext sqlToyContext, Serializable source, Class<T> resultType); static List<T> mapList(SqlToyContext sqlToyContext, List<Serializable> sourceList,
			Class<T> resultType);  }### Answer:
@Test public void testVOToPO() { StaffInfoVO staffInfoVO = new StaffInfoVO(); staffInfoVO.setStaffId("S2007"); staffInfoVO.setStaffCode("S2007"); staffInfoVO.setPostType("MASTER"); staffInfoVO.setStaffName("测试员工9"); staffInfoVO.setSexType("M"); staffInfoVO.setEmail("test3@aliyun.com"); staffInfoVO.setEntryDate(LocalDate.now()); staffInfoVO.setStatus(1); staffInfoVO.setOrganId("100007"); staffInfoVO.setCountry("86"); SqlToyContext context = new SqlToyContext(); try { context.initialize(); StaffInfo staffInfo = MapperUtils.map(context, staffInfoVO, StaffInfo.class); System.err.println(JSON.toJSONString(staffInfo)); } catch (Exception e) { e.printStackTrace(); } }
@Test public void testPOTOVO() { StaffInfo staffInfo = new StaffInfo(); staffInfo.setStaffId("S2007"); staffInfo.setStaffCode("S2007"); staffInfo.setPost("MASTER"); staffInfo.setStaffName("测试员工9"); staffInfo.setSexType("M"); staffInfo.setEmail("test3@aliyun.com"); staffInfo.setEntryDate(LocalDate.now()); staffInfo.setStatus(1); staffInfo.setOrganId("100007"); staffInfo.setCountry("86"); SqlToyContext context = new SqlToyContext(); try { context.initialize(); StaffInfoVO staffInfoVO = MapperUtils.map(context, staffInfo, StaffInfoVO.class); System.err.println(JSON.toJSONString(staffInfoVO)); StaffInfo staffInfo1 = MapperUtils.map(context, staffInfoVO, StaffInfo.class); System.err.println(JSON.toJSONString(staffInfo1)); } catch (Exception e) { e.printStackTrace(); } }