"java.util.logging.SocketHandler.host"));
assertNull(LOG_MANAGER.getProperty(
"java.util.logging.SocketHandler.port"));
try {
h = new SocketHandler();
fail("Should throw IllegalArgumentException!");
} catch (IllegalArgumentException e) {
}
try {
h = new SocketHandler(null, 0);
fail("Should throw IllegalArgumentException!");
} catch (IllegalArgumentException e) {
}
try {
h = new SocketHandler("", 0);
fail("Should throw IllegalArgumentException!");
} catch (IllegalArgumentException e) {
}
try {
h = new SocketHandler("127.0.0.1", -1);
fail("Should throw IllegalArgumentException!");
} catch (IllegalArgumentException e) {
}
try {
h = new SocketHandler("127.0.0.1", Integer.MAX_VALUE);
fail("Should throw IllegalArgumentException!");
} catch (IllegalArgumentException e) {
}
try {
h = new SocketHandler("127.0.0.1", 66666);
fail("Should throw IllegalArgumentException!");
} catch (IllegalArgumentException e) {
}
try {
h = new SocketHandler("127.0.0.1", 0);
fail("Should throw IllegalArgumentException!");
} catch (IllegalArgumentException e) {
}
// start the server to be ready to accept log messages
ServerThread thread = new ServerThread();
thread.start();
Thread.sleep(2000);
h = new SocketHandler("127.0.0.1", 6666);
assertSame(h.getLevel(), Level.ALL);
assertTrue(h.getFormatter() instanceof XMLFormatter);
assertNull(h.getFilter());
assertNull(h.getEncoding());
h.close();