JdbcInventory extends JdbcHelper implements Inventory { @Override public List<InventoryVector> getMissing(List<InventoryVector> offer, long... streams) { for (long stream : streams) { offer.removeAll(getCache(stream).keySet()); } return offer; } JdbcInventory(JdbcConfig config); @Override List<InventoryVector> getInventory(long... streams); @Override List<InventoryVector> getMissing(List<InventoryVector> offer, long... streams); @Override ObjectMessage getObject(InventoryVector vector); @Override List<ObjectMessage> getObjects(long stream, long version, ObjectType... types); @Override void storeObject(ObjectMessage object); @Override boolean contains(ObjectMessage object); @Override void cleanup();  }
@Test public void testGetMissing() throws Exception { InventoryVector newIV = getObjectMessage(1, 200, getGetPubkey()).getInventoryVector(); List<InventoryVector> offer = new LinkedList<>(); offer.add(newIV); offer.add(inventoryVector1); List<InventoryVector> missing = inventory.getMissing(offer, 1, 2); assertEquals(1, missing.size()); assertEquals(newIV, missing.get(0)); }