### Question:
CodeReviewRequestListener implements BackgroundTaskListener { @Override public void onFailure() { uiInvoker.raiseVisibleException("Failed to create the code review request."); } CodeReviewRequestListener(CodeReviewRequestTask task, IdeUIInvoker uiInvoker); @Override void onBegin(); @Override void onSuccess(); @Override void onFailure(); @Override void onInterruption();  }### Answer:
@Test public void raisesAnErrorOnFailure() { listener.onFailure(); verify(invoker, times(1)).raiseVisibleException("Failed to create the code review request."); }