### Question:
EthHash { public static byte[] hashimotoLight( final long size, final int[] cache, final byte[] header, final long nonce) { return hashimoto(header, size, nonce, (target, ind) -> calcDatasetItem(target, cache, ind)); }  static byte[] hashimotoLight(
      final long size, final int[] cache, final byte[] header, final long nonce); static byte[] hashimoto(
      final byte[] header,
      final long size,
      final long nonce,
      final BiConsumer<byte[], Integer> datasetLookup); static void calcDatasetItem(final byte[] buffer, final int[] cache, final int index); static byte[] hashHeader(final SealableBlockHeader header); static long epoch(final long block); static int[] mkCache(final int cacheSize, final long block); static long cacheSize(final long epoch); static long datasetSize(final long epoch); static final int HASH_BYTES; static final BigInteger TARGET_UPPER_BOUND; static final int EPOCH_LENGTH; }### Answer:
@Test public void hashimotoLight() throws Exception { final RLPInput input = new BytesValueRLPInput( Bytes.wrap(Resources.toByteArray(EthHashTest.class.getResource("block_300005.blocks"))), false); input.enterList(); final BlockHeader header = BlockHeader.readFrom(input, new MainnetBlockHeaderFunctions()); final long blockNumber = header.getNumber(); final long epoch = EthHash.epoch(blockNumber); final long datasetSize = EthHash.datasetSize(epoch); final long cacheSize = EthHash.cacheSize(epoch); Assertions.assertThat(datasetSize).isEqualTo(1157627776); Assertions.assertThat(cacheSize).isEqualTo(18087488); final int[] cache = EthHash.mkCache((int) cacheSize, blockNumber); Assertions.assertThat( Hash.wrap( Bytes32.wrap( Arrays.copyOf( EthHash.hashimotoLight( datasetSize, cache, EthHash.hashHeader(header), header.getNonce()), 32)))) .isEqualTo(header.getMixHash()); }