HtmlDisplayAdapter extends ForegroundDisplayAdapter { @NonNull public static HtmlDisplayAdapter newAdapter(@NonNull InAppMessage message) { HtmlDisplayContent displayContent = message.getDisplayContent(); if (displayContent == null) { throw new IllegalArgumentException("Invalid message for adapter: " + message); } return new HtmlDisplayAdapter(message, displayContent); } protected  HtmlDisplayAdapter(@NonNull InAppMessage message, @NonNull HtmlDisplayContent displayContent); @NonNull static HtmlDisplayAdapter newAdapter(@NonNull InAppMessage message); @PrepareResult @Override int onPrepare(@NonNull Context context, @NonNull Assets assets); @Override boolean isReady(@NonNull Context context); @Override void onDisplay(@NonNull Context context, @NonNull DisplayHandler displayHandler); @Override void onFinish(@NonNull Context context);  }
@Test public void testCreateAdapter() { try { HtmlDisplayAdapter.newAdapter(htmlMessage); } catch (Exception e) { Assert.fail(e.getMessage()); } }