class ChunkedResponse implements ServerResponse {

  private static final int DEFAULT_MAX_CHUNK_SIZE = 204800;
  private final ResponseProvider<List<String>> bodyProvider;
  private final boolean repeatable;
  private final long responseDelay;
  private final TimeUnit responseDelayUnit;

  public ChunkedResponse(boolean repeatable, int statusCode, String... body) {
    this(repeatable, ResponseProviders.ofAll(statusCode, body));
  }

  public ChunkedResponse(boolean repeatable, ResponseProvider<List<String>> bodyProvider) {
    this(repeatable, 0, TimeUnit.MILLISECONDS, bodyProvider);
  }

  public ChunkedResponse(boolean repeatable, int statusCode, long responseDelay, TimeUnit responseDelayUnit, String... body) {
    this(repeatable, responseDelay, responseDelayUnit, ResponseProviders.ofAll(statusCode, body));
  }

  public ChunkedResponse(boolean repeatable, long responseDelay, TimeUnit responseDelayUnit,
      ResponseProvider<List<String>> bodyProvider) {
    this.bodyProvider = bodyProvider;
    this.repeatable = repeatable;
    this.responseDelay = responseDelay;
    this.responseDelayUnit = responseDelayUnit;
  }

  public ResponseProvider<List<String>> getBodyProvider() {
    return bodyProvider;
  }

  @Override
  public MockResponse toMockResponse(RecordedRequest request) {
    MockResponse mockResponse = new MockResponse();
    mockResponse.setHeaders(bodyProvider.getHeaders());
    mockResponse.setChunkedBody(concatBody(request), DEFAULT_MAX_CHUNK_SIZE);
    mockResponse.setResponseCode(bodyProvider.getStatusCode(request));

    if (responseDelay > 0) {
      mockResponse.setBodyDelay(responseDelay, responseDelayUnit);
    }

    return mockResponse;
  }

  private String concatBody(RecordedRequest request) {<FILL_FUNCTION_BODY>}

  @Override
  public boolean isRepeatable() {
    return repeatable;
  }
}

    StringBuilder sb = new StringBuilder();
    for (String s : bodyProvider.getBody(request)) {
      sb.append(s);
    }
    return sb.toString();
  
<no_super_class>