BlockchainServiceImpl implements BlockchainService { @Override public synchronized <H extends Object, B extends Serializable> List<B> getAll(List<H> hashes, Blockchain blockchain, BlockchainUnitType type) throws IOException, ClassNotFoundException { logger.traceEntry("params: {} {} {}", hashes, blockchain, type); Util.check(hashes != null, "hashes!=null"); Util.check(blockchain != null, "blockchain!=null"); List<B> list = new ArrayList<>(); for (H hash : hashes) { B val = getLocal(hash, blockchain, type); if (val != null) { list.add(val); } } return logger.traceExit(list); }  @Override synchronized boolean contains(H hash, Blockchain blockchain, BlockchainUnitType type); synchronized void putAndWait(H hash, B object, Blockchain blockchain, BlockchainUnitType type); @Override synchronized void put(H hash, B object, Blockchain blockchain, BlockchainUnitType type); @Override synchronized void putLocal(H hash, B object, Blockchain blockchain, BlockchainUnitType type); @Override synchronized List<B> getAll(List<H> hashes, Blockchain blockchain, BlockchainUnitType type); @Override synchronized B get(H hash, Blockchain blockchain, BlockchainUnitType type); @Override synchronized B getLocal(H hash, Blockchain blockchain, BlockchainUnitType type);  }
@Test(expected = IllegalArgumentException.class) public void testGetAllWithNullHashShouldThrowExtension() throws IOException, ClassNotFoundException { blockchainService.getAll(null, blockchain, BlockchainUnitType.BLOCK); }
@Test(expected = IllegalArgumentException.class) public void testGetAllWithNullBlockchainShouldThrowExtension() throws IOException, ClassNotFoundException { blockchainService.getAll(new ArrayList<String>(), null, BlockchainUnitType.BLOCK); }