### Question:
LongHashIndex { public boolean isEmpty() { return size == 0; } LongHashIndex( int size );  LongHashIndex(); int getSize(); boolean isEmpty(); Long get( long key ); void put( long key, Long value ); static int generateHashCode( Long key ); static int indexFor( int hash, int length );  }### Answer:
@Test public void testIsEmpty() throws KettleValueException { LongHashIndex index = new LongHashIndex(); assertThat( "Empty index should return true.", index.isEmpty(), is( true ) ); index.put( 1L, 1L ); assertThat( "Not empty index should return false.", index.isEmpty(), is( false ) ); }
@Test public void testIsEmpty() throws HopValueException { LongHashIndex index = new LongHashIndex(); assertThat( "Empty index should return true.", index.isEmpty(), is( true ) ); index.put( 1L, 1L ); assertThat( "Not empty index should return false.", index.isEmpty(), is( false ) ); }