@Test
public void generateAdUrl_shouldNotProcessTwitterInstallStatusIfStatusIsAlreadySet() throws Exception {

    AdUrlBuilder urlBuilder = new AdUrlBuilder(expectedUdid);
    WebViewAdUrlGenerator spySubject = Mockito.spy(subject);
    AdUrlGenerator.setTwitterAppInstalledStatus(TwitterAppInstalledStatus.NOT_INSTALLED);
    doReturn(TwitterAppInstalledStatus.INSTALLED).when(spySubject).getTwitterAppInstallStatus();
    String adUrl = spySubject.generateUrlString("ads.mopub.com");
    assertThat(adUrl).isEqualTo(urlBuilder.withTwitterAppInstalledStatus(TwitterAppInstalledStatus.NOT_INSTALLED).build());
}