Initializer { @RequiresPermission(allOf = { Manifest.permission.INTERNET, Manifest.permission.ACCESS_NETWORK_STATE}) public void launch(@Nullable VWOStatusListener statusListener) { if (statusListener != null) { if(vwo.getConfig() == null) { VWOConfig vwoConfig = new VWOConfig.Builder().setVWOStatusListener(statusListener).build(); vwo.setConfig(vwoConfig); } else { vwo.getConfig().setStatusListener(statusListener); } } setup(null); vwo.startVwoInstance(); } Initializer(VWO vwo, String apiKey, @Nullable Boolean optOut); @RequiresPermission(allOf = { Manifest.permission.INTERNET, Manifest.permission.ACCESS_NETWORK_STATE}) void launch(@Nullable VWOStatusListener statusListener); @RequiresPermission(allOf = { Manifest.permission.INTERNET, Manifest.permission.ACCESS_NETWORK_STATE}) void launchSynchronously(long timeout); Initializer config(@NonNull VWOConfig vwoConfig);  }
@Test public void launchAsyncTest() throws InterruptedException { initializer.launch(new VWOStatusListener() { @Override public void onVWOLoaded() { synchronized (lock) { lock.notifyAll(); } System.out.println("Loaded successfully"); } @Override public void onVWOLoadFailure(String reason) { synchronized (lock) { lock.notifyAll(); } System.out.println("Failed to load data because " + reason); } }); synchronized (lock) { lock.wait(); } Assert.assertEquals("grid", VWO.getObjectForKey("layout", null)); }