@Test public void testGetUserEntityDetailsSuccessfully() { UserEntity mockUserEntity = mock(UserEntity.class); cloudUserDataStore.getUserEntityDetails(FAKE_USER_ID, mockUserDetailsDataStoreCallback); verify(mockRestApi).getUserById(anyInt(), restApiUserDetailsCallbackArgumentCaptor.capture()); verifyZeroInteractions(mockUserDetailsDataStoreCallback); verifyZeroInteractions(mockUserCache); restApiUserDetailsCallbackArgumentCaptor.getValue().onUserEntityLoaded(mockUserEntity); verify(mockUserDetailsDataStoreCallback).onUserEntityLoaded(mockUserEntity); }
@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);  }