@Test @SuppressWarnings("unchecked") public void testGetUserEntityListSuccessfully() { Collection<UserEntity> mockUserEntityCollection = (Collection<UserEntity>) mock(Collection.class); cloudUserDataStore.getUsersEntityList(mockUserListDataStoreCallback); verify(mockRestApi).getUserList(restApiUserListCallbackArgumentCaptor.capture()); verifyZeroInteractions(mockUserListDataStoreCallback); verifyZeroInteractions(mockUserCache); restApiUserListCallbackArgumentCaptor.getValue().onUserListLoaded(mockUserEntityCollection); verify(mockUserListDataStoreCallback).onUserListLoaded(mockUserEntityCollection); }
@Override public void getUsersEntityList(final UserListCallback userListCallback) { this.restApi.getUserList(new RestApi.UserListCallback() { @Override public void onUserListLoaded(Collection<UserEntity> usersCollection) { userListCallback.onUserListLoaded(usersCollection); } @Override public void onError(Exception exception) { userListCallback.onError(exception); } }); }
CloudUserDataStore implements UserDataStore { @Override public void getUsersEntityList(final UserListCallback userListCallback) { this.restApi.getUserList(new RestApi.UserListCallback() { @Override public void onUserListLoaded(Collection<UserEntity> usersCollection) { userListCallback.onUserListLoaded(usersCollection); } @Override public void onError(Exception exception) { userListCallback.onError(exception); } }); } }
CloudUserDataStore implements UserDataStore { @Override public void getUsersEntityList(final UserListCallback userListCallback) { this.restApi.getUserList(new RestApi.UserListCallback() { @Override public void onUserListLoaded(Collection<UserEntity> usersCollection) { userListCallback.onUserListLoaded(usersCollection); } @Override public void onError(Exception exception) { userListCallback.onError(exception); } }); }  }
CloudUserDataStore implements UserDataStore { @Override public void getUsersEntityList(final UserListCallback userListCallback) { this.restApi.getUserList(new RestApi.UserListCallback() { @Override public void onUserListLoaded(Collection<UserEntity> usersCollection) { userListCallback.onUserListLoaded(usersCollection); } @Override public void onError(Exception exception) { userListCallback.onError(exception); } }); }  @Override void getUsersEntityList(final UserListCallback userListCallback); @Override void getUserEntityDetails(int id,
                                     final UserDetailsCallback userDetailsCallback); }
CloudUserDataStore implements UserDataStore { @Override public void getUsersEntityList(final UserListCallback userListCallback) { this.restApi.getUserList(new RestApi.UserListCallback() { @Override public void onUserListLoaded(Collection<UserEntity> usersCollection) { userListCallback.onUserListLoaded(usersCollection); } @Override public void onError(Exception exception) { userListCallback.onError(exception); } }); }  @Override void getUsersEntityList(final UserListCallback userListCallback); @Override void getUserEntityDetails(int id,
                                     final UserDetailsCallback userDetailsCallback);  }