assertEquals(response.getContentAsByteArray(), validImage);
}
@Test
public void getFavIconPNGLogoShouldReturnPropertyIconWhenPropertyExists() throws IOException, ImageProcessException {
Component forumComponent = new Component();
String logoProperty = "logo";
Base64Wrapper wrapper = new Base64Wrapper();
byte[] logoBytes = wrapper.decodeB64Bytes(logoProperty);
forumComponent.addProperty(TransactionalComponentService.COMPONENT_FAVICON_PNG_PARAM, logoProperty);
when(componentService.getComponentOfForum()).thenReturn(forumComponent);
when(componentService.getComponentModificationTime()).thenReturn(new Date());
MockHttpServletResponse response = new MockHttpServletResponse();
administrationController.getFavIconPNG(new MockHttpServletRequest(), response);