@Override
  public void define(Context context) {
    NewController controller = context.createController("api/user_groups")
      .setDescription("Manage user groups.")
      .setSince("5.2");

    for (UserGroupsWsAction action : actions) {
      action.define(controller);
    }

    controller.done();
  }
@Test
  public void define_controller() {
    WebService.Context context = new WebService.Context();

    underTest.define(context);

    WebService.Controller controller = context.controller("api/user_groups");
    assertThat(controller).isNotNull();
    assertThat(controller.description()).isNotEmpty();
    assertThat(controller.since()).isEqualTo("5.2");
    assertThat(controller.actions()).hasSize(1);
  }