### Question:
UsageServiceMyBatis implements UsageService { @Override public List<Integer> listAll() { try (Connection con = ds.getConnection()){ ProxyConnection hikari = (ProxyConnection) con; PGConnection pgcon = hikari.unwrap(PGConnection.class); IntArrayPgWriter intMapper = new IntArrayPgWriter(); pgcon.getCopyAPI().copyOut("copy (SELECT id FROM name_usage WHERE deleted IS NULL) TO STDOUT WITH NULL '' ", intMapper); return intMapper.result(); } catch (Exception e) { LOG.error("Failed to load all usage ids", e); throw new RuntimeException("Exception while loading usage ids", e); } } @Inject  UsageServiceMyBatis(NameUsageMapper mapper, UsageMapper usageMapper); @Override List<Integer> listAll(); @Override Integer maxUsageKey(UUID datasetKey); @Override List<NameUsage> listRange(int usageKeyStart, int usageKeyEnd); @Override List<Integer> listParents(int usageKey); @Override List<Integer> listOldUsages(UUID datasetKey, Date before);  }### Answer:
@Test public void testlistAll() { List<Integer> squirrels = service.listAll(); assertEquals(46, squirrels.size()); }