### Question:
InstanceLogDao { public void insert(final InstanceLogModel... logs) { if ((logs == null) || (logs.length == 0)) { return; } this.insert(Lists.newArrayList(logs)); } private  InstanceLogDao(); List<InstanceOperationLog> select(InstanceLogModel filter, Boolean complete); List<InstanceOperationLog> query(final String condition, final List<String> args); void insert(final InstanceLogModel... logs); void insert(final List<InstanceLogModel> logs); static final InstanceLogDao INSTANCE; }### Answer:
@Test public void testInsert() { final InstanceLogModel log1 = InstanceLogModels.newInstanceLogModel(); final InstanceLogModel log2 = InstanceLogModels.newInstanceLogModel(); log1.setComplete(true); log2.setComplete(true); final List<InstanceLogModel> logs = Lists.newArrayList(log1, log2); _instanceLogDao.insert(log1, log2); for (final InstanceLogModel log : logs) { final List<InstanceOperationLog> logModels = query(log); Assert.assertEquals(1, logModels.size()); InstanceLogModels.assertInstanceLog(log, logModels.get(0)); } log1.setComplete(false); log2.setComplete(false); _instanceLogDao.insert(log1, log2); for (final InstanceLogModel log : logs) { final List<InstanceOperationLog> logModels = query(log); Assert.assertEquals(1, logModels.size()); InstanceLogModels.assertInstanceLog(log, logModels.get(0)); } }