@SuppressWarnings("unchecked")
public void testSetPresenter() {
UserRpcAsync securityService = EasyMock.createMock(UserRpcAsync.class);
ProjectRpcAsync projServiceObserver = EasyMock.createMock(ProjectRpcAsync.class);
ProjectSettingsView viewObserver = EasyMock.createMock(ProjectSettingsView.class);
Project project = new Project();
project.setProjectId(42L);
securityService.getAccessLevel(EasyMock.eq(42L), EasyMock.isA(AsyncCallback.class));
EasyMockUtils.setLastAsyncCallbackSuccessWithResult(ProjectAccess.VIEW_ACCESS);
viewObserver.setPresenter((Presenter) EasyMock.anyObject());
viewObserver.setProjectSettings(project);
viewObserver.enableProjectEditing(ProjectAccess.VIEW_ACCESS);
EasyMock.replay(viewObserver, securityService);
ProjectSettingsPresenter presenter = new ProjectSettingsPresenter(
project, projServiceObserver, securityService, viewObserver, null);