@Test
public void testPutKey() throws Exception {

    IndexFile indexFile = new IndexFile("100", HASH_SLOT_NUM, INDEX_NUM, 0, 0);
    for (long i = 0; i < (INDEX_NUM - 1); i++) {
        boolean putResult = indexFile.putKey(Long.toString(i), i, System.currentTimeMillis());
        assertThat(putResult).isTrue();
    }
    // put over index file capacity.
    boolean putResult = indexFile.putKey(Long.toString(400), 400, System.currentTimeMillis());
    assertThat(putResult).isFalse();
    indexFile.destroy(0);
    File file = new File("100");
    UtilAll.deleteFile(file);
}