    @Test
    public void getVarTest() throws ExecutionException, InterruptedException {

        // Happy case
        var varVal = "value";
        assertNormalBehavior(
                () -> CompletableFuture.completedFuture(new ResponseMessage(1, null, varVal)),
                () -> bufferStreamApi.getVar("name"),
                request -> assertMethodAndArguments(request, NeovimBufferApi.GET_VAR, buffer, "name"),
                result -> assertEquals(varVal, result)
        );

        // Error case
        assertErrorBehavior(
                () -> bufferStreamApi.getVar("wrong name"),
                request -> assertMethodAndArguments(request, NeovimBufferApi.GET_VAR, buffer, "wrong name")
        );
    }