Code example for ConsoleHandler

Methods: getEncoding, getFilter, getFormatter, getLevel

0
		assertNull(LogManager.getLogManager().getProperty(
				"java.util.logging.ConsoleHandler.formatter")); 
		assertNull(LogManager.getLogManager().getProperty(
				"java.util.logging.ConsoleHandler.encoding")); 
 
		ConsoleHandler h = new ConsoleHandler();
		assertSame(h.getLevel(), Level.INFO);
		assertTrue(h.getFormatter() instanceof SimpleFormatter);
		assertNull(h.getFilter());
		assertSame(h.getEncoding(), null);
	} 
 
	/* 
	 * Test the constructor with valid relevant log manager properties are set. 
	 */ 
	public void testConstructor_ValidProperties() throws Exception { 
		Properties p = new Properties();
		p.put("java.util.logging.ConsoleHandler.level", "FINE");
		p.put("java.util.logging.ConsoleHandler.filter", className
				+ "$MockFilter"); 
		p.put("java.util.logging.ConsoleHandler.formatter", className