Source:
<code>public void initViews() { EditText passwordEditText = (EditText) loginActivity.findViewById(R.id.edittext_password); passwordEditText.setInputType(InputType.TYPE_CLASS_NUMBER); passwordEditText.setTransformationMethod(PasswordTransformationMethod.getInstance()); TextInputLayout passwordHint = (TextInputLayout) loginActivity.findViewById(R.id.password_hint); passwordHint.setHint(loginActivity.getResources().getText(R.string.login_password)); username = (EditText) loginActivity.findViewById(R.id.edittext_username); LinearLayout loginViewsContainer = (LinearLayout) loginActivity.findViewById(R.id.login_views_container); LayoutInflater inflater = LayoutInflater.from(loginActivity); Button forgotPassword = (Button) inflater.inflate(R.layout.forgot_password_button, null, false); loginViewsContainer.addView(forgotPassword); forgotPassword.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { onForgotPassword(); } }); IMainExecutor mainExecutor = new UIThreadExecutor(); IAsyncExecutor asyncExecutor = new AsyncExecutor(); ICredentialsRepository credentialsRepository = new CredentialsLocalDataSource(); <START> GetUserLastInsertedUsernameUseCase getUserLastInsertedUsernameUseCase = <END> new GetUserLastInsertedUsernameUseCase(mainExecutor, asyncExecutor, credentialsRepository); getUserLastInsertedUsernameUseCase.execute( new GetUserLastInsertedUsernameUseCase.Callback() { @Override public void onGetUsername(String username) { LoginActivityStrategy.this.username.setText(username); } }); }</code><technical_language>@manuelplazaspalacio asking opinion @xurxodev I tired I a UseCase for this, access credentialsRepository with: username.setText(credentialsRepository.getOrganisationCredentials().getUsername()); dependency is "the kernel of onion", I guess a problem...but @xurxodev correct need a UseCase for accessing entities in case...let's wait for confirmation. In case, sense for you</technical_language>

Target:
public void initViews() { EditText passwordEditText = (EditText) loginActivity.findViewById(R.id.edittext_password); passwordEditText.setInputType(InputType.TYPE_CLASS_NUMBER); passwordEditText.setTransformationMethod(PasswordTransformationMethod.getInstance()); TextInputLayout passwordHint = (TextInputLayout) loginActivity.findViewById(R.id.password_hint); passwordHint.setHint(loginActivity.getResources().getText(R.string.login_password)); username = (EditText) loginActivity.findViewById(R.id.edittext_username); LinearLayout loginViewsContainer = (LinearLayout) loginActivity.findViewById(R.id.login_views_container); LayoutInflater inflater = LayoutInflater.from(loginActivity); Button forgotPassword = (Button) inflater.inflate(R.layout.forgot_password_button, null, false); loginViewsContainer.addView(forgotPassword); forgotPassword.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { onForgotPassword(); } }); IMainExecutor mainExecutor = new UIThreadExecutor(); IAsyncExecutor asyncExecutor = new AsyncExecutor(); ICredentialsRepository credentialsRepository = new CredentialsLocalDataSource(); GetLastInsertedCredentialsUseCase getLastInsertedCredentialsUseCase = new GetLastInsertedCredentialsUseCase(mainExecutor, asyncExecutor, credentialsRepository); getLastInsertedCredentialsUseCase.execute( new GetLastInsertedCredentialsUseCase.Callback() { @Override public void onGetUsername(Credentials credentials) { if (credentials != null) { LoginActivityStrategy.this.username.setText(credentials.getUsername()); } } }); }