@Test public void testGetPropertyReturnDefaultWhenValueConversionFails() throws Exception { ConfigurationValue configurationValue = ConfigurationValue.BUSINESS_OBJECT_DATA_GET_ALL_MAX_RESULT_COUNT; Integer expectedValue = (Integer) configurationValue.getDefaultValue(); MockEnvironment environment = new MockEnvironment(); environment.setProperty(configurationValue.getKey(), "NOT_AN_INTEGER"); executeWithoutLogging(ConfigurationHelper.class, () -> { Integer value = ConfigurationHelper.getProperty(configurationValue, Integer.class, environment); assertNotNull("value", value); assertEquals("value", expectedValue, value); }); }