### Question:
CollectionV3controller extends BaseController { @RequestMapping(value = "/dialcode/link/{id:.+}", method = RequestMethod.POST) @ResponseBody public ResponseEntity<Response> linkDialCode(@PathVariable(value = "id") String contentId, @RequestBody Map<String, Object> requestMap, @RequestHeader(value = "X-Channel-Id", required = true) String channelId) { String apiId = "ekstep.collection.dialcode.link"; Request request = getRequest(requestMap); try { Object reqObj = request.get("content"); Response response = contentManager.linkDialCode(channelId, reqObj, "collection", contentId); return getResponseEntity(response, apiId, null); } catch (Exception e) { TelemetryManager.error("Exception occured while Linking Dial Code with Content: " + e.getMessage(), e); return getExceptionResponseEntity(e, apiId, null); } }  @RequestMapping(value = "/dialcode/link/{id:.+}", method = RequestMethod.POST) @ResponseBody ResponseEntity<Response> linkDialCode(@PathVariable(value = "id") String contentId,
                                                 @RequestBody Map<String, Object> requestMap,
                                                 @RequestHeader(value = "X-Channel-Id", required = true) String channelId);  }### Answer:
@Ignore @Test public void testDialLinkWithLiveCollection() throws Exception { String createCollReq = "{\"request\": {\"content\": {\"name\": \"Test-G-Dev-01\",\"code\": \"test.book.1\",\"mimeType\": \"application/vnd.ekstep.content-collection\",\"contentType\":\"TextBook\"}}}"; String textbookId = createContent(createCollReq); String sysUpdateReq = "{\"request\":{\"content\":{\"status\":\"Live\"}}}"; systemUpdate(textbookId, sysUpdateReq); updateCassandraHierarchy(textbookId, true); Response hierarchyResponse = getCollectionHierarchy(textbookId); assertEquals("OK", hierarchyResponse.getResponseCode().toString()); String dialLinkReq = "{\"request\":{\"content\":[{\"dialcode\":\"ABC123\",\"identifier\":\"do_11273971924529152012\"},{\"dialcode\":[\"BCD123\",\"CDE123\"],\"identifier\":[\"do_11273971924534886413\"]},{\"dialcode\":\"DEF123\",\"identifier\":[\"do_11273971924536524814\"]},{\"dialcode\":\"EFG123\",\"identifier\":[\"do_11273971924538982415\"]}]}}"; linkDialCode(textbookId, dialLinkReq); Response response = getContent(textbookId + ".img"); assertEquals("OK", response.getResponseCode().toString()); String imageHierarchy = getCassandraRecord(textbookId + ".img"); assertNotNull(imageHierarchy); for (String dialcode : VALID_DIAL_CODES) { if (!imageHierarchy.contains(dialcode)) assertTrue(false); } }