@Test
    public void testDisconnectDueToMax() throws Exception {
        final Properties config = new Properties();
        final int min_uptime = 20;
        final int max_uptime = 2000;
        config.setProperty("min_uptime",  "" + min_uptime);
        config.setProperty("max_uptime",   "" + max_uptime);
        final long started = System.currentTimeMillis();
        final MockConnectionProcessor proc = new MockConnectionProcessor();
        final Filter f = new DisconnectFilter(proc, config);
        while (proc.disconnect_count == 0) {
            Assert.assertEquals(10, f.filter(10));
            Thread.sleep(max_uptime);
        }
        final long age = System.currentTimeMillis() - started;
        Assert.assertTrue(age >= max_uptime);
	Assert.assertTrue(age > min_uptime);
    }