class XWindow implements DisplaySurface {

    @Override
    public ListenableFuture<Void> destroy() {
        final int winId = getWindowId();
        return this.xExecutor.submit(new Runnable() {

            @Override
            public void run() {
                LOG.debug("[winId={}] destroy.",
                        winId);
                xcb_destroy_window(getConnectionRef(),
                        winId);
                xcb_flush(getConnectionRef());
            }
        },
                null);
    }

}

class XWindowTest {

	private static final String displayName;
	private static final int screenNr;
	public static XConnection xConnection;
	public static xcb_screen_t screen;
	private static Process xvfb;
	private XWindow xWindow;
	private int windowId;
	@Mock
	private XTime xTime;

	@Test
	public void testDestroy() {

		this.xWindow.destroy();
		// TODO verify
	}

}