### Question:
WindowStreamApi extends BaseStreamApi implements NeovimWindowApi { @Override public CompletableFuture<Boolean> isValid() { return sendWithResponseOfType(prepareMessage(IS_VALID), Boolean.class); } WindowStreamApi(ReactiveRpcStreamer reactiveRpcStreamer, Window model); @Override Window get(); @Override CompletableFuture<NeovimBufferApi> getBuffer(); @Override CompletableFuture<Void> setBuffer(Buffer buffer); @Override CompletableFuture<VimCoords> getCursor(); @Override CompletableFuture<Void> setCursor(VimCoords vimCoords); @Override CompletableFuture<Integer> getHeight(); @Override CompletableFuture<Void> setHeight(int height); @Override CompletableFuture<Integer> getWidth(); @Override CompletableFuture<Void> setWidth(int width); @Override CompletableFuture<Object> getVar(String name); @Override CompletableFuture<Void> setVar(String name, Object value); @Override CompletableFuture<Void> deleteVar(String name); @Override CompletableFuture<Object> getOption(String name); @Override CompletableFuture<Void> setOption(String name, Object value); @Override CompletableFuture<Map<String, Object>> getConfig(); @Override CompletableFuture<Void> setConfig(Map<String, Object> config); @Override CompletableFuture<NeovimTabpageApi> getTabpage(); @Override CompletableFuture<Integer> getNumber(); @Override CompletableFuture<Boolean> isValid(); @Override CompletableFuture<Void> close(boolean force); @Override String toString();  }### Answer:
@Test public void isValidTest() throws ExecutionException, InterruptedException { assertNormalBehavior( () -> CompletableFuture.completedFuture(new ResponseMessage(1, null, false)), () -> windowStreamApi.isValid(), request -> assertMethodAndArguments(request, NeovimWindowApi.IS_VALID, window), Assert::assertFalse ); assertErrorBehavior( () -> windowStreamApi.isValid(), request -> assertMethodAndArguments(request, NeovimWindowApi.IS_VALID, window) ); }