    @Test
    public void newInstance_whenActivityIsNull_throwsException() {

        Exception thrownException = null;
        AppCompatTestActivity appCompatTestActivity = Robolectric.setupActivity(AppCompatTestActivity.class);
        WebView webView = new WebView(appCompatTestActivity);
        try {
            PopupBridge.newInstance(null, webView);
        } catch (IllegalArgumentException e){
            thrownException = e;
        } finally {
            assertEquals(thrownException.getMessage(), "Activity is null");
        }
    }