BannerDisplayContent implements DisplayContent { @NonNull public static Builder newBuilder() { return new Builder(); } private  BannerDisplayContent(@NonNull Builder builder); @NonNull static BannerDisplayContent fromJson(@NonNull JsonValue value); @NonNull @Override JsonValue toJsonValue(); @Nullable TextInfo getHeading(); @Nullable TextInfo getBody(); @Nullable MediaInfo getMedia(); @NonNull List<ButtonInfo> getButtons(); @NonNull @ButtonLayout String getButtonLayout(); @NonNull @Placement String getPlacement(); @NonNull @Template String getTemplate(); long getDuration(); @ColorInt int getBackgroundColor(); @ColorInt int getDismissButtonColor(); float getBorderRadius(); @NonNull Map<String, JsonValue> getActions(); @Override boolean equals(@Nullable Object o); @Override int hashCode(); @NonNull @Override String toString(); @NonNull static Builder newBuilder(); @NonNull static Builder newBuilder(@NonNull BannerDisplayContent displayContent); @NonNull
    static final String PLACEMENT_TOP; @NonNull
    static final String PLACEMENT_BOTTOM; @NonNull
    static final String TEMPLATE_LEFT_MEDIA; @NonNull
    static final String TEMPLATE_RIGHT_MEDIA; static final long DEFAULT_DURATION_MS; static final int MAX_BUTTONS; }
@Test(expected = IllegalArgumentException.class) public void testTooManyButtons() { BannerDisplayContent.newBuilder() .setBody(TextInfo.newBuilder() .setText("oh hi") .build()) .addButton(ButtonInfo.newBuilder() .setLabel(TextInfo.newBuilder() .setText("Oh hi") .build()) .setId("id") .build()) .addButton(ButtonInfo.newBuilder() .setLabel(TextInfo.newBuilder() .setText("Oh hi") .build()) .setId("id") .build()) .addButton(ButtonInfo.newBuilder() .setLabel(TextInfo.newBuilder() .setText("Oh hi") .build()) .setId("id") .build()) .build(); }
@Test(expected = IllegalArgumentException.class) public void testNoHeaderOrBody() { BannerDisplayContent.newBuilder() .addButton(ButtonInfo.newBuilder() .setLabel(TextInfo.newBuilder() .setText("Oh hi") .build()) .setId("id") .build()) .addButton(ButtonInfo.newBuilder() .setLabel(TextInfo.newBuilder() .setText("Oh hi") .build()) .setId("id") .build()) .build(); }
@Test public void testMedia() { BannerDisplayContent.newBuilder() .setMedia(MediaInfo.newBuilder() .setUrl("https: .setType(MediaInfo.TYPE_IMAGE) .setDescription("kitty cat") .build()) .setBody(TextInfo.newBuilder() .setText("oh hi") .build()) .addButton(ButtonInfo.newBuilder() .setLabel(TextInfo.newBuilder() .setText("Oh hi") .build()) .setId("id") .build()) .addButton(ButtonInfo.newBuilder() .setLabel(TextInfo.newBuilder() .setText("Oh hi") .build()) .setId("id") .build()) .build(); }