public void testMaxCapacity() throws Exception {
    StoreConfig config = new StoreConfig(getHomeDir(), Integer.MAX_VALUE);
    config.setIndexesCached(false); // Do not cache indexes in memory

    StaticDataStore store = StoreFactory.createStaticDataStore(config);

    // Check store capacity
    assertEquals(Integer.MAX_VALUE, store.capacity());
    assertEquals(Integer.MAX_VALUE, store.getDataArray().length());

    store.close();
  }