@Test public void createAndVerifyDiskSpaceWithUpperThresholdBeingCrossed() { DiskSpace diskSpace = new DiskSpace(EmptyConfiguration.INSTANCE); ThresholdValues tVals = new ThresholdValues(0.00, 0.05); diskSpace.setThresholdValues(tVals); SimpleThresholdListener l = new SimpleThresholdListener(); diskSpace.start(); if (!System.getProperty("os.name").startsWith("Windows")) { double utilization = diskSpace.getUtilization(); Assert.assertTrue("Utilization should be > 0", utilization > 0); } Assert.assertTrue(l.getType() == null); }