@Test public void testGetUserEntityDetailsError() { cloudUserDataStore.getUserEntityDetails(FAKE_USER_ID, mockUserDetailsDataStoreCallback); verify(mockRestApi).getUserById(anyInt(), restApiUserDetailsCallbackArgumentCaptor.capture()); verifyZeroInteractions(mockUserDetailsDataStoreCallback); restApiUserDetailsCallbackArgumentCaptor.getValue().onError(any(Exception.class)); verify(mockUserDetailsDataStoreCallback).onError(any(Exception.class)); verifyZeroInteractions(mockUserCache); }
@Override public void getUserEntityDetails(int id, final UserDetailsCallback userDetailsCallback) { this.restApi.getUserById(id, new RestApi.UserDetailsCallback() { @Override public void onUserEntityLoaded(UserEntity userEntity) { userDetailsCallback.onUserEntityLoaded(userEntity); } @Override public void onError(Exception exception) { userDetailsCallback.onError(exception); } }); }
CloudUserDataStore implements UserDataStore { @Override public void getUserEntityDetails(int id, final UserDetailsCallback userDetailsCallback) { this.restApi.getUserById(id, new RestApi.UserDetailsCallback() { @Override public void onUserEntityLoaded(UserEntity userEntity) { userDetailsCallback.onUserEntityLoaded(userEntity); } @Override public void onError(Exception exception) { userDetailsCallback.onError(exception); } }); } }
CloudUserDataStore implements UserDataStore { @Override public void getUserEntityDetails(int id, final UserDetailsCallback userDetailsCallback) { this.restApi.getUserById(id, new RestApi.UserDetailsCallback() { @Override public void onUserEntityLoaded(UserEntity userEntity) { userDetailsCallback.onUserEntityLoaded(userEntity); } @Override public void onError(Exception exception) { userDetailsCallback.onError(exception); } }); }  }
CloudUserDataStore implements UserDataStore { @Override public void getUserEntityDetails(int id, final UserDetailsCallback userDetailsCallback) { this.restApi.getUserById(id, new RestApi.UserDetailsCallback() { @Override public void onUserEntityLoaded(UserEntity userEntity) { userDetailsCallback.onUserEntityLoaded(userEntity); } @Override public void onError(Exception exception) { userDetailsCallback.onError(exception); } }); }  @Override void getUsersEntityList(final UserListCallback userListCallback); @Override void getUserEntityDetails(int id,
                                     final UserDetailsCallback userDetailsCallback); }
CloudUserDataStore implements UserDataStore { @Override public void getUserEntityDetails(int id, final UserDetailsCallback userDetailsCallback) { this.restApi.getUserById(id, new RestApi.UserDetailsCallback() { @Override public void onUserEntityLoaded(UserEntity userEntity) { userDetailsCallback.onUserEntityLoaded(userEntity); } @Override public void onError(Exception exception) { userDetailsCallback.onError(exception); } }); }  @Override void getUsersEntityList(final UserListCallback userListCallback); @Override void getUserEntityDetails(int id,
                                     final UserDetailsCallback userDetailsCallback);  }