add a test for window handles idempotence