public static double toDouble(String str, double defaultValue) {
        if (str == null) {
            return defaultValue;
        }
        try {
            return Double.parseDouble(str);
        } catch (NumberFormatException nfe) {
            return defaultValue;
        }
    }
@Test
    void testToDouble() {
        assertEquals(1.1d, NumberUtils.toDouble(null, 1.1d), 0);
        assertEquals(1.1d, NumberUtils.toDouble("", 1.1d), 0);
        assertEquals(1.5d, NumberUtils.toDouble("1.5", 0.0d), 0);
    }