### Question:
Sm extends ProduceableSubject<BlockInfo> implements Install<SmConfig> { public void setSmConfigCache(SmConfig smConfigCache) { if (smConfigCache == null || !smConfigCache.isValid()) { return; } SharedPreferences sharedPreferences = GodEye.instance().getApplication().getSharedPreferences("AndroidGodEye", 0); sharedPreferences.edit().putString("SmConfig", JsonUtil.toJson(smConfigCache)).apply(); }  @Override synchronized boolean install(SmConfig config); @Override synchronized void uninstall(); @Override synchronized boolean isInstalled(); @Override SmConfig config(); SmConfig installConfig(); void setSmConfigCache(SmConfig smConfigCache); void clearSmConfigCache();  }### Answer:
@Test public void setSmConfigCache() { GodEye.instance().uninstall(); GodEye.instance().install(GodEyeConfig.noneConfigBuilder().withSmConfig(new SmConfig()).build()); try { GodEye.instance().<Sm>getModule(GodEye.ModuleName.SM).setSmConfigCache(new SmConfig(true, 200, 150, 100)); Assert.assertEquals(200, GodEye.instance().<Sm>getModule(GodEye.ModuleName.SM).getValidSmConfigCache().longBlockThreshold()); GodEye.instance().<Sm>getModule(GodEye.ModuleName.SM).clearSmConfigCache(); Assert.assertNull(GodEye.instance().<Sm>getModule(GodEye.ModuleName.SM).getValidSmConfigCache()); } catch (UninstallException e) { Assert.fail(); } }