@POST
  @Path("register")
  @Produces(MediaType.APPLICATION_JSON)
  public Response register(Application app) {
    try {
      if (app.getName()==null) {
        throw new IOException("Application name can not be empty.");
      }
      if (app.getOrganization()==null) {
        throw new IOException("Application organization can not be empty.");
      }
      if (app.getDescription()==null) {
        throw new IOException("Application description can not be empty.");
      }
      AppCatalogSolrClient sc = new AppCatalogSolrClient();
      sc.register(app);
    } catch (IOException e) {
      return Response.status(Status.BAD_REQUEST).entity(e.getMessage()).build();
    }
    return Response.status(Status.ACCEPTED).build();
  }
@Test
  void testRegister() throws Exception {
    AppStoreController ac = Mockito.mock(AppStoreController.class);
    Application app = new Application();
    app.setName("jenkins");
    app.setOrganization("jenkins.org");
    app.setDescription("This is a description");
    app.setIcon("/css/img/feather.png");
    Response expected = Response.ok().build();
    when(ac.register(app)).thenReturn(Response.ok().build());
    final Response actual = ac.register(app);
    assertEquals(expected.getStatus(), actual.getStatus());
  }