WXStorageModule extends WXSDKEngine.DestroyableModule implements IWXStorage { @Override @WXModuleAnno public void getItem(String key, @Nullable final JSCallback callback) { if (TextUtils.isEmpty(key)) { StorageResultHandler.handleInvalidParam(callback); return; } IWXStorageAdapter adapter = ability(); if (adapter == null) { StorageResultHandler.handleNoHandlerError(callback); return; } adapter.getItem(key, new IWXStorageAdapter.OnResultReceivedListener() { @Override public void onReceived(Map<String, Object> data) { if(callback != null){ callback.invoke(data); } } }); }  @Override @WXModuleAnno void setItem(String key, String value, @Nullable final JSCallback callback); @Override @WXModuleAnno void getItem(String key, @Nullable final JSCallback callback); @Override @WXModuleAnno void removeItem(String key, @Nullable final JSCallback callback); @Override @WXModuleAnno void length(@Nullable final JSCallback callback); @Override @WXModuleAnno void getAllKeys(@Nullable final JSCallback callback); @Override void setItemPersistent(String key, String value, @Nullable final JSCallback callback); @Override void destroy();  }
@Test public void testGetItem() throws Exception { module.getItem("",callback); verify(callback,times(1)).invoke(any()); }