### Question:
FeedbackAnswerSubmitter { public void submitFeedback(List<FeedbackAnswer> answers, String answerUrl) { if (answers == null || answers.isEmpty() || answerUrl == null || answerUrl.trim().length() == 0) { return; } if (answersAreEmpty(answers)) { return; } server.submitFeedback(answerUrl, answers); } FeedbackAnswerSubmitter(ServerManager server); void submitFeedback(List<FeedbackAnswer> answers, String answerUrl);  }### Answer:
@Test public void serverManagerIsNotCalledWhenListIsEmpty() { submitter.submitFeedback(answers, ""); verify(server, times(0)).submitFeedback(Mockito.anyString(), Mockito.anyListOf(FeedbackAnswer.class)); }
@Test public void serverManagerIsNotCalledWhenListIsNull() { submitter.submitFeedback(null, ""); verify(server, times(0)).submitFeedback(Mockito.anyString(), Mockito.anyListOf(FeedbackAnswer.class)); }
@Test public void serverManagerIsNotCalledWhenUrlIsNull() { addAnswer(0, "Question text", "text", "answer"); submitter.submitFeedback(answers, null); verify(server, times(0)).submitFeedback(Mockito.anyString(), Mockito.anyListOf(FeedbackAnswer.class)); }
@Test public void serverManagerIsNotCalledWhenUrlIsEmpty() { addAnswer(0, "Question text", "text", "answer"); submitter.submitFeedback(answers, " "); verify(server, times(0)).submitFeedback(Mockito.anyString(), Mockito.anyListOf(FeedbackAnswer.class)); }
@Test public void serverManagerIsNotCalledWhenAnswersAreEmpty() { addAnswer(0, "Question text", "text", ""); submitter.submitFeedback(answers, url); verify(server, times(0)).submitFeedback(Mockito.anyString(), Mockito.anyListOf(FeedbackAnswer.class)); }
@Test public void submitFeedbackIsCalledWhenParametersAreCorrect() { addAnswer(0, "Question text", "text", "answer"); submitter.submitFeedback(answers, url); verify(server, times(1)).submitFeedback(url, answers); }