### Question:
AvailabilityOfEntriesOfLedger { public boolean isEntryAvailable(long entryId) { if (!isAvailabilityOfEntriesOfLedgerClosed()) { throw new IllegalStateException( "AvailabilityOfEntriesOfLedger is not yet closed, it is illegal to call isEntryAvailable"); } Entry<Long, SequenceGroup> seqGroup = sortedSequenceGroups.floorEntry(entryId); if (seqGroup == null) { return false; } return seqGroup.getValue().isEntryAvailable(entryId); } AvailabilityOfEntriesOfLedger(PrimitiveIterator.OfLong entriesOfLedgerItr);  AvailabilityOfEntriesOfLedger(long[] entriesOfLedger);  AvailabilityOfEntriesOfLedger(byte[] serializeStateOfEntriesOfLedger);  AvailabilityOfEntriesOfLedger(ByteBuf byteBuf); byte[] serializeStateOfEntriesOfLedger(); boolean isEntryAvailable(long entryId); List<Long> getUnavailableEntries(long startEntryId, long lastEntryId, BitSet availabilityOfEntries); long getTotalNumOfAvailableEntries(); static final long INVALID_ENTRYID; static final AvailabilityOfEntriesOfLedger EMPTY_AVAILABILITYOFENTRIESOFLEDGER; static final int HEADER_SIZE; static final int V0; static final int CURRENT_HEADER_VERSION; }### Answer:
@Test public void testNonExistingEntries() { long[][] arrays = { { 0, 1, 2 }, { 1, 2, 3, 5, 6, 7, 8 }, { 1, 5 }, { 3 }, { 1, 2, 4, 5, 7, 8 }, {}, { 1, 2, 3, 5, 6, 11, 12, 13, 14, 15, 16, 17, 100, 1000, 1001, 10000, 20000, 20001 } }; long[][] nonExistingEntries = { { 3 }, { 0, 4, 9, 100, 101 }, { 0, 2, 3, 6, 9 }, { 0, 1, 2, 4, 5, 6 }, { 0, 3, 9, 10, 11, 100, 1000 }, { 0, 1, 2, 3, 4, 5 }, { 4, 18, 1002, 19999, 20003 } }; for (int i = 0; i < arrays.length; i++) { long[] tempArray = arrays[i]; long[] nonExistingElementsTempArray = nonExistingEntries[i]; PrimitiveIterator.OfLong primitiveIterator = Arrays.stream(tempArray).iterator(); AvailabilityOfEntriesOfLedger availabilityOfEntriesOfLedger = new AvailabilityOfEntriesOfLedger( primitiveIterator); for (int j = 0; j < nonExistingElementsTempArray.length; j++) { assertFalse(nonExistingElementsTempArray[j] + " is not supposed to be available", availabilityOfEntriesOfLedger.isEntryAvailable(nonExistingElementsTempArray[j])); } } }