    @Test
    public void createOAuth2ApplicationScopeAliasesDataFetcher_without_user_id_should_return_new_object() throws Exception {

        // Given
        Map<String, Object> arguments = new HashMap<>();
        arguments.put("companyId", COMPANY_ID);
        arguments.put("userId", USER_ID);
        arguments.put("userName", USER_NAME);
        arguments.put("oAuth2ApplicationId", OAUTH2_APPLICATION_ID);
        arguments.put("scopeAliasesList", SCOPE_ALIASES_LIST);
        DataFetchingEnvironment environment = getTestEnvironment(arguments);

        OAuth2ApplicationScopeAliases expectedResult = mock(OAuth2ApplicationScopeAliases.class);
        expectedResult.setUserId(DEFAULT_USER_ID);
        expectedResult.setCompanyId(COMPANY_ID);
        expectedResult.setUserName(USER_NAME);
        expectedResult.setOAuth2ApplicationId(OAUTH2_APPLICATION_ID);
        expectedResult.setScopeAliasesList(Arrays.asList(SCOPE_ALIASES_LIST));

        // When / Then
        useMockGraphQLUtil(environment, DEFAULT_USER_ID, true);
        when(localService.addOAuth2ApplicationScopeAliases(eq(COMPANY_ID), eq(DEFAULT_USER_ID), eq(USER_NAME), eq(OAUTH2_APPLICATION_ID), eq(Arrays.asList(SCOPE_ALIASES_LIST))))
                .thenReturn(expectedResult);

        // Asserts
        OAuth2ApplicationScopeAliases result = resolvers.createOAuth2ApplicationScopeAliasesDataFetcher()
                .get(environment);
        assertNotNull(result);
        assertEquals(expectedResult, result);
    }