@Test
public void loadBanner_shouldCauseServerDimensionsToBeHonoredWhenLayingOutView() throws Exception {

    subject.loadBanner(context, customEventBannerListener, localExtras, serverExtras);
    MoPubView moPubView = TestMoPubViewFactory.getSingletonMock();
    stub(moPubView.getContext()).toReturn(context);
    AdViewController adViewController = new AdViewController(context, moPubView);
    HttpResponse response = new TestHttpResponseWithHeaders(200, "I ain't got no-body");
    response.addHeader("X-Width", "320");
    response.addHeader("X-Height", "50");
    adViewController.configureUsingHttpResponse(response);
    adViewController.setAdContentView(htmlBannerWebView);
    ArgumentCaptor<FrameLayout.LayoutParams> layoutParamsCaptor = ArgumentCaptor.forClass(FrameLayout.LayoutParams.class);
    verify(moPubView).addView(eq(htmlBannerWebView), layoutParamsCaptor.capture());
    FrameLayout.LayoutParams layoutParams = layoutParamsCaptor.getValue();
    assertThat(layoutParams.width).isEqualTo(320);
    assertThat(layoutParams.height).isEqualTo(50);
    assertThat(layoutParams.gravity).isEqualTo(Gravity.CENTER);
}