Source:
<code>public void testGetIntentForBrokerActivityHasIntent() throws NameNotFoundException, OperationCanceledException, IOException, AuthenticatorException { final AuthenticationRequest authRequest = createAuthenticationRequest("<LINK_0>", "resource", "client", "redirect", "loginhint", PromptBehavior.Auto, "", UUID.randomUUID(), false); final AccountManager mockAcctManager = getMockedAccountManager(AuthenticationConstants.Broker.BROKER_ACCOUNT_TYPE, AuthenticationConstants.Broker.COMPANY_PORTAL_APP_PACKAGE_NAME); final Bundle expected = new Bundle(); final Intent expectedIntent = new Intent(); expectedIntent.putExtra(AuthenticationConstants.Broker.BROKER_REQUEST, AuthenticationConstants.Broker.BROKER_REQUEST); expected.putParcelable(AccountManager.KEY_INTENT, expectedIntent); prepareAddAccount(mockAcctManager, expected); final FileMockContext context = new FileMockContext(InstrumentationRegistry.getContext()); context.setMockedAccountManager(mockAcctManager); context.setMockedPackageManager(getMockedPackageManagerWithBrokerAccountServiceDisabled(mock(Signature.class), AuthenticationConstants.Broker.COMPANY_PORTAL_APP_PACKAGE_NAME, true)); final BrokerProxy brokerProxy = new BrokerProxy(context); try { final Intent intent = brokerProxy.getIntentForBrokerActivity(authRequest, null); assertNotNull("intent is not null", intent); assertEquals("intent is not null", AuthenticationConstants.Broker.BROKER_REQUEST, intent.getStringExtra(AuthenticationConstants.Broker.BROKER_REQUEST)); } catch (final AuthenticationException exc) { <START> fail("Not expected."); <END> } }</code><technical_language>minor, consider changing test declaration</technical_language>

Target:
public void testGetIntentForBrokerActivityHasIntent() throws NameNotFoundException, OperationCanceledException, IOException, AuthenticatorException, AuthenticationException { final AuthenticationRequest authRequest = createAuthenticationRequest("<LINK_0>", "resource", "client", "redirect", "loginhint", PromptBehavior.Auto, "", UUID.randomUUID(), false); final AccountManager mockAcctManager = getMockedAccountManager(AuthenticationConstants.Broker.BROKER_ACCOUNT_TYPE, AuthenticationConstants.Broker.COMPANY_PORTAL_APP_PACKAGE_NAME); final Bundle expected = new Bundle(); final Intent expectedIntent = new Intent(); expectedIntent.putExtra(AuthenticationConstants.Broker.BROKER_REQUEST, AuthenticationConstants.Broker.BROKER_REQUEST); expected.putParcelable(AccountManager.KEY_INTENT, expectedIntent); prepareAddAccount(mockAcctManager, expected); final FileMockContext context = new FileMockContext(InstrumentationRegistry.getContext()); context.setMockedAccountManager(mockAcctManager); context.setMockedPackageManager(getMockedPackageManagerWithBrokerAccountServiceDisabled(mock(Signature.class), AuthenticationConstants.Broker.COMPANY_PORTAL_APP_PACKAGE_NAME, true)); final BrokerProxy brokerProxy = new BrokerProxy(context); final Intent intent = brokerProxy.getIntentForBrokerActivity(authRequest, null); assertNotNull("intent is not null", intent); assertEquals("intent is not null", AuthenticationConstants.Broker.BROKER_REQUEST, intent.getStringExtra(AuthenticationConstants.Broker.BROKER_REQUEST)); }