### Question:
GlobalHeap { public int getObjectReferenceCount(int index) { if (!objects.containsKey(index)) { throw new IllegalArgumentException("Global heap doesn't contain object with index: " + index); } return objects.get(index).referenceCount; } GlobalHeap(HdfFileChannel hdfFc, long address); @Override String toString(); ByteBuffer getObjectData(int index); int getObjectReferenceCount(int index);  }### Answer:
@Test void testGettingReferencesToObject() { assertThat(globalHeap.getObjectReferenceCount(1), is(equalTo(0))); }
@Test void testGettingReferencesToObjectOutOfRangeThrows() { assertThrows(IllegalArgumentException.class, () -> globalHeap.getObjectReferenceCount(5)); }