### Question:
ThrowErrorTree extends PriorityTree { @Override protected void log(int priority, String tag, @NotNull String message, Throwable t) { if (skipLog(priority, tag, message, t)) { return; } if (t != null) { throw new LogPriorityExceededError(priority, getPriorityFilter().getMinPriority(), t); } else { throw new LogPriorityExceededError(priority, getPriorityFilter().getMinPriority()); } } ThrowErrorTree();  ThrowErrorTree(int logPriority);   }### Answer:
@Test public void testLog() throws Exception { ThrowErrorTree tree = new ThrowErrorTree(); Throwable testThrowable = new Throwable("test"); try { tree.log(Log.INFO, "tag", "message", testThrowable); fail("Expected LogPriorityExceededError"); } catch (LogPriorityExceededError e) { assertEquals(testThrowable, e.getCause()); } }