public float toFloat(String name) {
        return toFloat(name, 0.0f);
    }
@Test
    public void testToFloat_String() {
        System.out.println("toFloat");
        float expResult;
        float result;

        Properties props = new Properties();
        props.put("value1", "12345.6789");
        props.put("value2", "-9000.001");
        props.put("empty", "");
        props.put("str", "abc");
        props.put("boolean", "true");
        props.put("float", "24.98");
        props.put("int", "12");
        props.put("char", "a");
        PropertyParser instance = new PropertyParser(props);

        expResult = 12345.6789f;
        result = instance.toFloat("value1");
        assertEquals(expResult, result, 0f);

        expResult = -9000.001f;
        result = instance.toFloat("value2");
        assertEquals(expResult, result, 0f);

        expResult = 0f;
        result = instance.toFloat("empty");
        assertEquals(expResult, result, 0f);

        expResult = 0f;
        result = instance.toFloat("str");
        assertEquals(expResult, result, 0f);

        expResult = 0f;
        result = instance.toFloat("boolean");
        assertEquals(expResult, result, 0f);

        expResult = 24.98f;
        result = instance.toFloat("float");
        assertEquals(expResult, result, 0f);

        expResult = 12f;
        result = instance.toFloat("int");
        assertEquals(expResult, result, 0f);

        expResult = 0f;
        result = instance.toFloat("char");
        assertEquals(expResult, result, 0f);

        expResult = 0f;
        result = instance.toFloat("nonexistent");
        assertEquals(expResult, result, 0f);
    }