@Test(expectedExceptions = InvalidPropertyException.class) public void testValidateShouldThrowExceptionWhenFiOffLimitLessThanFiOnLimit() { given(getFiOffLimit()).willReturn(2L); given(getFiOnLimit()).willReturn(3L); given(getMwOffLimit()).willReturn(5L); given(getMwOnLimit()).willReturn(4L); underTest.validate(); }
public void validate() { Long fiOffLimit = propertyHolder.getLong("safeguard.responseFIdecoder.OFFlimit"); Long fiOnLimit = propertyHolder.getLong("safeguard.responseFIdecoder.ONlimit"); Long mwOffLimit = propertyHolder.getLong("safeguard.responseMessageWriter.OFFlimit"); Long mwOnLimit = propertyHolder.getLong("safeguard.responseMessageWriter.ONlimit"); String jmxPort = propertyHolder.get("com.sun.management.jmxremote.port"); checkLimits(new SafeguardLimits(fiOffLimit, fiOnLimit, mwOffLimit, mwOnLimit, jmxPort)); }
SafeguardLimitValidator { public void validate() { Long fiOffLimit = propertyHolder.getLong("safeguard.responseFIdecoder.OFFlimit"); Long fiOnLimit = propertyHolder.getLong("safeguard.responseFIdecoder.ONlimit"); Long mwOffLimit = propertyHolder.getLong("safeguard.responseMessageWriter.OFFlimit"); Long mwOnLimit = propertyHolder.getLong("safeguard.responseMessageWriter.ONlimit"); String jmxPort = propertyHolder.get("com.sun.management.jmxremote.port"); checkLimits(new SafeguardLimits(fiOffLimit, fiOnLimit, mwOffLimit, mwOnLimit, jmxPort)); } }
SafeguardLimitValidator { public void validate() { Long fiOffLimit = propertyHolder.getLong("safeguard.responseFIdecoder.OFFlimit"); Long fiOnLimit = propertyHolder.getLong("safeguard.responseFIdecoder.ONlimit"); Long mwOffLimit = propertyHolder.getLong("safeguard.responseMessageWriter.OFFlimit"); Long mwOnLimit = propertyHolder.getLong("safeguard.responseMessageWriter.ONlimit"); String jmxPort = propertyHolder.get("com.sun.management.jmxremote.port"); checkLimits(new SafeguardLimits(fiOffLimit, fiOnLimit, mwOffLimit, mwOnLimit, jmxPort)); }  }
SafeguardLimitValidator { public void validate() { Long fiOffLimit = propertyHolder.getLong("safeguard.responseFIdecoder.OFFlimit"); Long fiOnLimit = propertyHolder.getLong("safeguard.responseFIdecoder.ONlimit"); Long mwOffLimit = propertyHolder.getLong("safeguard.responseMessageWriter.OFFlimit"); Long mwOnLimit = propertyHolder.getLong("safeguard.responseMessageWriter.ONlimit"); String jmxPort = propertyHolder.get("com.sun.management.jmxremote.port"); checkLimits(new SafeguardLimits(fiOffLimit, fiOnLimit, mwOffLimit, mwOnLimit, jmxPort)); }  void validate(); }
SafeguardLimitValidator { public void validate() { Long fiOffLimit = propertyHolder.getLong("safeguard.responseFIdecoder.OFFlimit"); Long fiOnLimit = propertyHolder.getLong("safeguard.responseFIdecoder.ONlimit"); Long mwOffLimit = propertyHolder.getLong("safeguard.responseMessageWriter.OFFlimit"); Long mwOnLimit = propertyHolder.getLong("safeguard.responseMessageWriter.ONlimit"); String jmxPort = propertyHolder.get("com.sun.management.jmxremote.port"); checkLimits(new SafeguardLimits(fiOffLimit, fiOnLimit, mwOffLimit, mwOnLimit, jmxPort)); }  void validate();  }