public int toInt(String name) {
        return toInt(name, 0);
    }
@Test
    public void testToInt_String() {
        System.out.println("toInt");
        int expResult;
        int result;

        Properties props = new Properties();
        props.put("value1", "123");
        props.put("value2", "-54");
        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 = 123;
        result = instance.toInt("value1");
        assertEquals(expResult, result);

        expResult = -54;
        result = instance.toInt("value2");
        assertEquals(expResult, result);

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

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

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

        expResult = 0;
        result = instance.toInt("float");
        assertEquals(expResult, result);

        expResult = 12;
        result = instance.toInt("int");
        assertEquals(expResult, result);

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

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