@Test
public void testFormatTemplateShouldGetRequestBodyFromWilmaRequest() throws Exception {

    //GIVEN
    params.addParameter(new Parameter(XSL_PARAM_KEY, XSL_PARAM_KEY));
    given(stubResourcePathProvider.getTemplatesPathAsString()).willReturn(XSL_PARAM_KEY);
    given(fileFactory.createFile(Mockito.anyString())).willReturn(file);
    given(fileUtils.getFileAsByteArray(file)).willReturn(templateResource);
    given(wilmaRequest.getBody()).willReturn(templateResource.toString());
    //WHEN
    underTest.formatResponse(wilmaRequest, response, templateResource, params);
    //THEN
    verify(wilmaRequest).getBody();
}