@ApiOperation(value = "Get Edge Upgrade Instructions (getEdgeUpgradeInstructions)",
            notes = "Get an upgrade instructions for provided edge version." + TENANT_AUTHORITY_PARAGRAPH)
    @PreAuthorize("hasAnyAuthority('TENANT_ADMIN')")
    @GetMapping(value = "/edge/instructions/upgrade/{edgeVersion}/{method}")
    public EdgeInstructions getEdgeUpgradeInstructions(
            @Parameter(description = "Edge version", required = true)
            @PathVariable("edgeVersion") String edgeVersion,
            @Parameter(description = "Upgrade method ('docker', 'ubuntu' or 'centos')", schema = @Schema(allowableValues = {"docker", "ubuntu", "centos"}))
            @PathVariable("method") String method) throws Exception {
        if (isEdgesEnabled() && edgeUpgradeServiceOpt.isPresent()) {
            return checkNotNull(edgeUpgradeServiceOpt.get().getUpgradeInstructions(edgeVersion, method));
        } else {
            throw new ThingsboardException("Edges support disabled", ThingsboardErrorCode.GENERAL);
        }
    }
@Test
    public void testGetEdgeUpgradeInstructions() throws Exception {
        // UpdateInfo config is updating from Thingsboard Update server
        HashMap<String, EdgeUpgradeInfo> upgradeInfoHashMap = new HashMap<>();
        upgradeInfoHashMap.put("3.6.0", new EdgeUpgradeInfo(true, "3.6.1"));
        upgradeInfoHashMap.put("3.6.1", new EdgeUpgradeInfo(true, "3.6.2"));
        upgradeInfoHashMap.put("3.6.2", new EdgeUpgradeInfo(true, null));
        edgeUpgradeInstructionsService.updateInstructionMap(upgradeInfoHashMap);
        Edge edge = constructEdge("Edge for Test Docker Upgrade Instructions", "default");
        Edge savedEdge = doPost("/api/edge", edge, Edge.class);
        String body = "{\"edgeVersion\": \"V_3_6_0\"}";
        doPostAsync("/api/plugins/telemetry/EDGE/" + savedEdge.getId().getId() + "/attributes/SERVER_SCOPE", body, String.class, status().isOk());
        String upgradeInstructions = doGet("/api/edge/instructions/upgrade/" + EdgeVersion.V_3_6_0.name() + "/docker", String.class);
        Assert.assertTrue(upgradeInstructions.contains("Upgrading to 3.6.1EDGE"));
        Assert.assertTrue(upgradeInstructions.contains("Upgrading to 3.6.2EDGE"));
    }