private PlatformUser givenUser(String locale) { Organization org = new Organization(); org.setOrganizationId(ORGANIZATION_ID); org.setName(ORGANIZATION_NAME); PlatformUser user = new PlatformUser(); user.setUserId(USER_ID); user.setOrganization(org); user.setLocale(locale); return user; }
@Before public void setup() throws Exception { dsMock = mock(DataService.class); Organization org = new Organization(); org.setOrganizationId(ORGANIZATIONID); PlatformUser user = new PlatformUser(); user.setUserId(USERID_1); user.setLocale("en"); user.setOrganization(org); when(dsMock.getCurrentUser()).thenReturn(user); marketplace = new Marketplace(); marketplace.setKey(1000l); doReturn(marketplace).when(dsMock).getReferenceByBusinessKey(any(Marketplace.class)); }