class ServerProtocolV1 implements Server {

    @NonNull
    @Override
    public ConfigureCommandResult configure(@NonNull String... cacheArguments) throws IOException {
        throwIfNotConnected("configure");

        ConfigureRequest configureRequest = new ConfigureRequest();

        // Insert a blank element to work around a bug in Cmake 3.7.1 where the first element is
        // ignored.
        configureRequest.cacheArguments = new String[cacheArguments.length + 1];
        configureRequest.cacheArguments[0] = "";
        System.arraycopy(
                cacheArguments, 0, configureRequest.cacheArguments, 1, cacheArguments.length);

        writeMessage(new GsonBuilder().setPrettyPrinting().create().toJson(configureRequest));
        configureMessages = new ArrayList<>();
        ConfigureResult configureResult = decodeResponse(ConfigureResult.class, configureMessages);
        configured = ServerUtils.isConfigureResultValid(configureResult);

        return new ConfigureCommandResult(
                configureResult,
                !configureMessages.isEmpty()
                        ? getInteractiveMessagesAsString(configureMessages)
                        : "");
    }

      ServerProtocolV1(@NonNull File cmakeInstallPath, @NonNull ServerReceiver serverReceiver);
    @VisibleForTesting  ServerProtocolV1(
            @NonNull File cmakeInstallPath,
            @NonNull ServerReceiver serverReceiver,
            Process process,
            BufferedReader input,
            BufferedWriter output);

}