public int parseInt(String name) {
        return Integer.parseInt(getProperties().getProperty(name));
    }
@Test
    public void testParseInt() {
        System.out.println("parseInt");
        int expResult;
        int result;

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

        expResult = -242;
        result = instance.parseInt("value2");
        assertEquals(expResult, result);

        try {
            instance.parseInt("empty");
            fail("no exception");
        } catch (NumberFormatException e) {
        }

        try {
            instance.parseInt("str");
            fail("no exception");
        } catch (NumberFormatException e) {
        }

        try {
            instance.parseInt("boolean");
            assertEquals(expResult, result);
            fail("no exception");
        } catch (NumberFormatException e) {
        }

        try {
            instance.parseInt("float");
            fail("no exception");
        } catch (NumberFormatException e) {
        }

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

        try {
            instance.parseInt("char");
            fail("no exception");
        } catch (NumberFormatException e) {
        }

        try {
            expResult = 0;
            result = instance.parseInt("nonexistent");
            fail("no exception");
            assertEquals(expResult, result);
        } catch (IllegalArgumentException e) {
        }
    }