Example #1
0
  @Test
  public void checkRequest_ko() {
    expectedException.expect(BadRequestException.class);
    expectedException.expectMessage("Missing param: foo");

    WsUtils.checkRequest(false, "Missing param: %s", "foo");
  }
Example #2
0
 @Test
 public void checkRequest_ok() {
   WsUtils.checkRequest(true, "Missing param: %s", "foo");
   // do not fail
 }