public long parseLong(String name) {
        return Long.parseLong(getProperties().getProperty(name));
    }
@Test
    public void testParseLong() {
        System.out.println("parseLong");
        long expResult;
        long result;

        Properties props = new Properties();
        props.put("value1", "12345678900");
        props.put("value2", "-9000001");
        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 = 12345678900L;
        result = instance.parseLong("value1");
        assertEquals(expResult, result);

        expResult = -9000001L;
        result = instance.parseLong("value2");
        assertEquals(expResult, result);

        try {
            instance.parseLong("empty");
            fail("no exception");
        } catch (IllegalArgumentException e) {
        }

        try {
            instance.parseLong("str");
            fail("no exception");
        } catch (IllegalArgumentException e) {
        }

        try {
            instance.parseLong("boolean");
            fail("no exception");
        } catch (IllegalArgumentException e) {
        }

        try {
            instance.parseLong("float");
            fail("no exception");
        } catch (IllegalArgumentException e) {
        }

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

        try {
            instance.parseLong("char");
            fail("no exception");
        } catch (IllegalArgumentException e) {
        }

        try {
            instance.parseLong("nonexistent");
            fail("no exception");
        } catch (IllegalArgumentException e) {
        }
    }