@Test public void testGetUserEntityByIdError() { diskUserDataStore.getUserEntityDetails(FAKE_USER_ID, mockUserDetailsDataStoreCallback); verify(mockUserCache).get(anyInt(), userCacheCallbackArgumentCaptor.capture()); verifyZeroInteractions(mockUserDetailsDataStoreCallback); userCacheCallbackArgumentCaptor.getValue().onError(any(Exception.class)); verify(mockUserDetailsDataStoreCallback).onError(any(Exception.class)); }
@Override public void getUserEntityDetails(int id, final UserDetailsCallback userDetailsCallback) { this.userCache.get(id, new UserCache.UserCacheCallback() { @Override public void onUserEntityLoaded(UserEntity userEntity) { userDetailsCallback.onUserEntityLoaded(userEntity); } @Override public void onError(Exception exception) { userDetailsCallback.onError(exception); } }); }
DiskUserDataStore implements UserDataStore { @Override public void getUserEntityDetails(int id, final UserDetailsCallback userDetailsCallback) { this.userCache.get(id, new UserCache.UserCacheCallback() { @Override public void onUserEntityLoaded(UserEntity userEntity) { userDetailsCallback.onUserEntityLoaded(userEntity); } @Override public void onError(Exception exception) { userDetailsCallback.onError(exception); } }); } }
DiskUserDataStore implements UserDataStore { @Override public void getUserEntityDetails(int id, final UserDetailsCallback userDetailsCallback) { this.userCache.get(id, new UserCache.UserCacheCallback() { @Override public void onUserEntityLoaded(UserEntity userEntity) { userDetailsCallback.onUserEntityLoaded(userEntity); } @Override public void onError(Exception exception) { userDetailsCallback.onError(exception); } }); }  }
DiskUserDataStore implements UserDataStore { @Override public void getUserEntityDetails(int id, final UserDetailsCallback userDetailsCallback) { this.userCache.get(id, new UserCache.UserCacheCallback() { @Override public void onUserEntityLoaded(UserEntity userEntity) { userDetailsCallback.onUserEntityLoaded(userEntity); } @Override public void onError(Exception exception) { userDetailsCallback.onError(exception); } }); }  @Override void getUsersEntityList(UserListCallback userListCallback); @Override void getUserEntityDetails(int id,
                                     final UserDetailsCallback userDetailsCallback); }
DiskUserDataStore implements UserDataStore { @Override public void getUserEntityDetails(int id, final UserDetailsCallback userDetailsCallback) { this.userCache.get(id, new UserCache.UserCacheCallback() { @Override public void onUserEntityLoaded(UserEntity userEntity) { userDetailsCallback.onUserEntityLoaded(userEntity); } @Override public void onError(Exception exception) { userDetailsCallback.onError(exception); } }); }  @Override void getUsersEntityList(UserListCallback userListCallback); @Override void getUserEntityDetails(int id,
                                     final UserDetailsCallback userDetailsCallback);  }