### Question:
ServiceInstanceDao { protected void insertOrUpdate(final ServiceInstanceModel... groupInstances) { insertOrUpdate(Lists.newArrayList(groupInstances)); } private  ServiceInstanceDao(); List<ServiceInstanceModel> query(); List<ServiceInstanceModel> select(ServiceInstanceModel filter); List<ServiceInstanceModel> select(List<Long> groupIds); static final ServiceInstanceDao INSTANCE; }### Answer:
@Test public void testInsertOrUpdate() throws Exception { ServiceInstanceModel serviceInstance = newServiceInstance(); serviceInstanceDao.insertOrUpdate(serviceInstance); serviceInstanceDao.insertOrUpdate(serviceInstance); assertServiceInstance(serviceInstance, query(serviceInstance)); }