@Override protected void onFirstPeerRegistered() { AsyncPrettyPrinterExecutorHolder.ensureInitialized(); if (mAsyncPrettyPrinterRegistry == null && mPrettyPrinterInitializer != null) { mAsyncPrettyPrinterRegistry = new AsyncPrettyPrinterRegistry(); mPrettyPrinterInitializer.populatePrettyPrinters(mAsyncPrettyPrinterRegistry); } mResponseBodyFileManager.cleanupFiles(); }
@Before public void setup() { mPrettyPrinterTestFactory = new PrettyPrinterTestFactory(); mResponseBodyFileManager = mock(ResponseBodyFileManager.class); mAsyncPrettyPrinterRegistry = new AsyncPrettyPrinterRegistry(); mAsyncPrettyPrinterRegistry.register(TEST_HEADER_NAME, mPrettyPrinterTestFactory); AsyncPrettyPrinterExecutorHolder.ensureInitialized(); }