@DeleteMapping("/apps/{appId:.+}")
  public void delete(@PathVariable("appId") String appId, @RequestParam String operator) {
    App entity = appService.findOne(appId);
    if (entity == null) {
      throw NotFoundException.appNotFound(appId);
    }
    adminService.deleteApp(entity, operator);
  }
@Test
  @Sql(scripts = "/controller/cleanup.sql", executionPhase = ExecutionPhase.AFTER_TEST_METHOD)
  public void testDelete() {
    AppDTO dto = generateSampleDTOData();
    App app = BeanUtils.transform(App.class, dto);
    app = appRepository.save(app);

    restTemplate.delete(url("/apps/{appId}?operator={operator}"), app.getAppId(), "test");

    App deletedApp = appRepository.findById(app.getId()).orElse(null);
    Assert.assertNull(deletedApp);
  }