Fix `log4j-jul` ApiLoggerTest
`setLevel` does not throw any more.
@@ -21,6 +21,7 @@ import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
import java.util.logging.Logger;
@@ -82,8 +83,12 @@ public class ApiLoggerTest extends AbstractLoggerTest {
logger.setParent(null);
}
- @Test(expected = UnsupportedOperationException.class)
- public void testSetLevelFails() throws Exception {
+ @Test
+ public void testSetLevelDoesNotFail() throws Exception {
+ try {
logger.setLevel(null);
+ } catch (Throwable e) {
+ fail("should not throw");
+ }
}
}
