throws GenieException, ClientException, IOException {
Mockito.when(this.response.isSuccess()).thenReturn(true);
final ObjectMapper mapper = new ObjectMapper();
final StringWriter writer = new StringWriter();
mapper.writeValue(writer, APPLICATION);
final String inputEntity = writer.toString();
final InputStream is = new ByteArrayInputStream(inputEntity.getBytes(Charset.forName("UTF-8")));
Mockito.when(this.response.getInputStream()).thenReturn(is);
Mockito.when(this.restClient.executeWithLoadBalancer(this.request)).thenReturn(this.response);