### Question:
DeviceTypeDaoImpl implements DeviceTypeDao { @Override public void insert(List<DeviceType> deviceTypes) { String sql = "insert into device_type(type_id,name,img_url) values(?,?,?)"; for (DeviceType deviceType : deviceTypes) { template.update(sql, new Object[]{deviceType.getTypeId(), deviceType.getName(), deviceType.getImgUrl()}); } }  JdbcTemplate getTemplate(); void setTemplate(JdbcTemplate template); @Override void insert(List<DeviceType> deviceTypes); @Override void insert(DeviceType deviceType); @Override List<DeviceType> getDeviceTypeList();  }### Answer:
@Test public void insert() throws Exception { DeviceType deviceType = new DeviceType(); deviceType.setName("aa"); deviceType.setImgUrl("bb"); deviceType.setTypeId(1); deviceTypeDao.insert(deviceType); }