@Override
    public FeedOperation read() throws Exception {
        if (finished) {
            return FeedOperation.INVALID;
        }

        byte whatToDo = stream.getNextOperation();
        DocumentId id = new DocumentId("id:banana:banana::doc1");
        DocumentType docType = new DocumentType("banana");
        return switch (whatToDo) {
            case 0 -> FeedOperation.INVALID;
            case 1 -> new DocumentFeedOperation(new DocumentPut(new Document(docType, id)));
            case 2 -> new RemoveFeedOperation(new DocumentRemove(id));
            case 3 -> new DocumentUpdateFeedOperation(new DocumentUpdate(docType, id));
            default -> throw new RuntimeException("boom");
        };
    }
Mock for ExternalFeedTestCase which had to override package private methods.

@author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
vespaclient-container-plugin/src/test/java/com/yahoo/vespaxmlparser/MockReader.java