public void testSetLenient() {
        // make sure that date format works as expected
        SimpleDateFormat dateFormat = new SimpleDateFormat("MMM dd, yyyy", Locale.UK);
        
        // test with no leniency
        dateFormat.setLenient(false);
        
        try {
            
            dateFormat.parse("Feb 10, 2001");
            
        } catch (ParseException e) {
            fail("Could not parse date (1) - " + e.getMessage());
        }
        
        try {
        
            dateFormat.parse("Feb 31, 2001");
            fail("Parsed illegal date (1)");
        
        } catch (ParseException e) {
            // that's what we expected
        }
        
        // test with leniency
        dateFormat.setLenient(true);
        
        try {
            
            dateFormat.parse("Feb 10, 2001");
            
        } catch (ParseException e) {
            fail("Could not parse date (2) - " + e.getMessage());
        }
        
        try {
        
            dateFormat.parse("Feb 31, 2001");
        
        } catch (ParseException e) {
            fail("Could not parse date (3) - " + e.getMessage());
        }
        
        // now repeat tests for converter
        DateLocaleConverter converter = new DateLocaleConverter(Locale.UK, "MMM dd, yyyy");
        
        // test with no leniency
        converter.setLenient(false);
        assertEquals("Set lenient failed", converter.isLenient(), false);
        
        try {
            
            converter.convert("Feb 10, 2001");
            
        } catch (ConversionException e) {
            fail("Could not parse date (4) - " + e.getMessage());
        }
        
        try {
        
            converter.convert("Feb 31, 2001");
            assertEquals("Set lenient failed", converter.isLenient(), false);
            fail("Parsed illegal date (2)");
        
        } catch (ConversionException e) {
            // that's what we expected
        }
        
        // test with leniency
        converter.setLenient(true);
        assertEquals("Set lenient failed", converter.isLenient(), true);
        
        try {
            
            converter.convert("Feb 10, 2001");
            
        } catch (ConversionException e) {
            fail("Could not parse date (5) - " + e.getMessage());
        }
        
        try {
        
            converter.convert("Feb 31, 2001");
        
        } catch (ConversionException e) {
            fail("Could not parse date (6) - " + e.getMessage());
        }
    }