### Question:
ShardEntryGroup { public boolean isCompactionPending() { return getCompactionTarget() != null; } ShardEntryGroup( final long delta ); boolean addShard( final Shard shard ); Shard getMinShard(); Collection<Shard> getReadShards(); Collection<Shard> getWriteShards( long currentTime ); boolean isCompactionPending(); Shard getCompactionTarget(); int entrySize(); boolean shouldCompact( final long currentTime ); boolean isNew(final long currentTime); boolean canBeDeleted( final Shard shard ); @Override String toString();  }### Answer:
@Test public void isCompactionPending(){ final Shard minShard = Shard.MIN_SHARD; final ShardEntryGroup oneShardGroup = new ShardEntryGroup( 1 ); oneShardGroup.addShard( minShard ); assertFalse(oneShardGroup.isCompactionPending()); final Shard nextShard = new Shard( 1000, 1000, false ); final ShardEntryGroup pendingGroup = new ShardEntryGroup( 1 ); pendingGroup.addShard( nextShard ); pendingGroup.addShard( minShard ); assertTrue(pendingGroup.isCompactionPending()); }