### Question:
Cache { public static Cache getInstance () { if (instance == null) { throw new IllegalStateException("You havent initialized cache with Cache::init() before."); } return instance; } protected  Cache(String path); static void init(String path); static Cache getInstance(); String getPath(); void createDirIfAbsent(String dirName); String getCachePath(String dirName); String getCacheFilePath(String filePath); void clear();  }### Answer:
@Test (expected = IllegalStateException.class) public void testGetInstance () { Cache.instance = null; Cache.getInstance(); }