### Question:
ConnectionManagerImpl implements ConnectionManager { @Override public void setApplicationId(String applicationId) { if (ButtonUtil.isApplicationIdValid(applicationId)) { this.applicationId = applicationId; baseUrl = String.format(ButtonMerchant.FMT_BASE_URL_APP_ID, applicationId); } } @VisibleForTesting  ConnectionManagerImpl(String baseUrl, String userAgent, PersistenceManager persistenceManager); @Override void setApplicationId(String applicationId); @Nullable @Override String getApplicationId(); @Override NetworkResponse executeRequest(@NonNull ApiRequest request);  }### Answer:
@Test public void setApplicationId_shouldUpdateEndpoint() { connectionManager = new ConnectionManagerImpl(ButtonMerchant.BASE_URL, VALID_UA, persistenceManager); connectionManager.setApplicationId("app-abcdef1234567890"); String expectedUrl = String.format(ButtonMerchant.FMT_BASE_URL_APP_ID, "app-abcdef1234567890"); assertEquals(expectedUrl, ((ConnectionManagerImpl) connectionManager).baseUrl); }