public static ApplyPermissionTemplateQuery create(String templateUuid, List<String> componentKeys) {
    return new ApplyPermissionTemplateQuery(templateUuid, componentKeys);
  }
@Test
  public void should_invalidate_query_with_no_components() {
    assertThatThrownBy(() -> create("my_template_key", Collections.emptyList()))
      .isInstanceOf(BadRequestException.class)
      .hasMessage("No project provided. Please provide at least one project.");
  }