assertThat(
" レスポンスコードが204",
tester.response.getStatus(),
is(HttpServletResponse.SC_NO_CONTENT));
assertThat(" メールが送信される", mailDelegate.messages.size(), is(1));
MailMessage mail = mailDelegate.messages.get(0);
assertThat(
"From",
mail.getSender(),
is("minutes@yourappid.appspotmail.com"));
assertThat("To", mail.getTo(0), is("test@example.com"));
assertThat(
"Subject",
mail.getSubject(),
is(" 議事録[" + minutes.getTitle() + "] がTSV に変換されました"));
assertThat(
"Body",
mail.getTextBody(Charset.forName("utf-8")),
containsString("http://localhost/minutes?download="));
// ApiProxy.Delegate をもとに戻す。
ApiProxy.setDelegate(parentDelegate);
}