@@ -0,0 +1,2019 @@
+/*%0A * Copyright 2017, TeamDev Ltd. All rights reserved.%0A *%0A * Redistribution and use in source and/or binary forms, with or without%0A * modification, must retain the above copyright notice and the following%0A * disclaimer.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS%0A * %22AS IS%22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT%0A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR%0A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT%0A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,%0A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT%0A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,%0A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY%0A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE%0A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0A%0Apackage org.spine3.examples.todolist.testdata;%0A%0Aimport com.google.common.collect.ImmutableList;%0Aimport io.grpc.stub.StreamObserver;%0Aimport org.spine3.base.Response;%0A%0Aimport java.util.List;%0A%0Aimport static com.google.common.collect.Lists.newLinkedList;%0A%0A/**%0A * @author Illia Shepilov%0A */%0Apublic class TestResponseObserver implements StreamObserver%3CResponse%3E %7B%0A%0A    private final List%3CResponse%3E responses = newLinkedList();%0A    private Throwable throwable;%0A    private boolean completed = false;%0A%0A    @Override%0A    public void onNext(Response response) %7B%0A        responses.add(response);%0A    %7D%0A%0A    @Override%0A    public void onError(Throwable throwable) %7B%0A        this.throwable = throwable;%0A    %7D%0A%0A    @Override%0A    public void onCompleted() %7B%0A        this.completed = true;%0A    %7D%0A%0A    List%3CResponse%3E getResponses() %7B%0A        return ImmutableList.copyOf(responses);%0A    %7D%0A%0A    Throwable getThrowable() %7B%0A        return throwable;%0A    %7D%0A%0A    boolean isCompleted() %7B%0A        return this.completed;%0A    %7D%0A%7D%0A

Move `TestResponseObserver` to the own class.