public long toLong(String name) {
        return toLong(name, 0);
    }
@Test
    public void testToLong_String() {
        System.out.println("toLong");
        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.toLong("value1");
        assertEquals(expResult, result);

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

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

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

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

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

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

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

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