AppController extends Controller implements AMParams { void badRequest(String s) { setStatus(HttpServletResponse.SC_BAD_REQUEST); String title = "Bad request: "; setTitle((s != null) ? join(title, s) : title); } protected  AppController(App app, Configuration conf, RequestContext ctx,
      String title); @Inject protected  AppController(App app, Configuration conf, RequestContext ctx); @Override void index(); void info(); void job(); void jobCounters(); void taskCounters(); void singleJobCounter(); void singleTaskCounter(); void tasks(); void task(); void attempts(); void conf(); void downloadConf(); void requireJob(); void requireTask();  }
@Test public void testBadRequest() { String message = "test string"; appController.badRequest(message); verifyExpectations(message); }
@Test public void testBadRequestWithNullMessage() { appController.badRequest(null); verifyExpectations(StringUtils.EMPTY); }