@Test public void testLRUCacheForKeyDeletionAfterMaxSizeIsReached() throws Exception {

  // delete store path
  deleteStorePath();
  String columnIdentifier = columnIdentifiers[0];
  // prepare dictionary writer and write data
  prepareWriterAndWriteData(dataSet1, columnIdentifier);
  // create dictionary column unique identifier instance
  DictionaryColumnUniqueIdentifier dictionaryColumnUniqueIdentifier =
      createDictionaryColumnUniqueIdentifier(columnIdentifier);
  // get the reverse dictionary object
  Dictionary reverseDictionary =
      (Dictionary) reverseDictionaryCache.get(dictionaryColumnUniqueIdentifier);
  // reverse dictionary object should not be null
  assertTrue(null != reverseDictionary);
  // decrement access count
  reverseDictionary.clear();
  // mock get end offset method so that required size is greater than
  // available size limit
  new MockUp<CarbonDictionaryColumnMetaChunk>() {
    @Mock public long getEnd_offset() {
      return 10485755L;
    }
  };
  columnIdentifier = columnIdentifiers[1];
  // prepare dictionary writer and write data
  prepareWriterAndWriteData(dataSet1, columnIdentifier);
  // create dictionary column unique identifier instance
  dictionaryColumnUniqueIdentifier = createDictionaryColumnUniqueIdentifier(columnIdentifier);
  // get the reverse dictionary object
  // lru cache should delete the existing key and empty the size for new key addition
  reverseDictionary = (Dictionary) reverseDictionaryCache.get(dictionaryColumnUniqueIdentifier);
  // reverse dictionary object should not be null
  assertTrue(null != reverseDictionary);
  // remove keys from lru cache
  removeKeyFromLRUCache(reverseDictionaryCache);
}