@Override
  public void define(Context context) {
    NewController controller = context.createController(CONTROLLER)
      .setSince("6.6")
      .setDescription("Manage branch");
    Arrays.stream(actions).forEach(action -> action.define(controller));
    controller.done();
  }
@Test
  public void define_ws() {
    BranchesWs underTest = new BranchesWs(new BranchWsAction() {
      @Override
      public void define(WebService.NewController context) {
        context.createAction("foo").setHandler(this);
      }

      @Override
      public void handle(Request request, Response response) {

      }
    });

    WebService.Context context = new WebService.Context();
    underTest.define(context);

    assertThat(context.controller("api/project_branches").action("foo")).isNotNull();
  }