class MetadataMigrationAdminResource {

    @Path(MIGRATION_STATUS_URI)
    @GET
    @Produces(MediaType.APPLICATION_JSON)
    public Response isMigrationInProgress() {

        try {
            VitamThreadUtils.getVitamSession().initIfAbsent(VitamConfiguration.getAdminTenant());

            boolean started = this.dataMigrationService.isMongoDataUpdateInProgress();

            if (started) {
                LOGGER.info("Migration still in progress");
                return Response.ok(new ResponseMessage("Migration in progress")).build();
            } else {
                LOGGER.info("No active migration");
                return Response.status(Response.Status.NOT_FOUND).entity(new ResponseMessage("No active migration"))
                    .build();
            }
        } catch (Exception e) {
            LOGGER.error("An error occurred during data migration", e);
            return Response.serverError().entity(new ResponseMessage(e.getMessage())).build();
        }
    }

    public  MetadataMigrationAdminResource();
    @VisibleForTesting  MetadataMigrationAdminResource(
        DataMigrationService dataMigrationService);

}