@Test
public void testGetDcaeMsTemplateData() {

    logger.debug("testGetDCAEMSTemplateData: enter");
    CreateDcaeMicroServiceController controller = new CreateDcaeMicroServiceController();
    MockHttpServletResponse response = new MockHttpServletResponse();
    String msModelJson = "{\"policyData\":\"DkatPolicyBody\"}";
    try {
        CreateDcaeMicroServiceController.setCommonClassDao(commonClassDao);
        BufferedReader br = new BufferedReader(new StringReader(msModelJson));
        // mock the getReader() call
        when(request.getReader()).thenReturn(br);
        List<Object> microServiceModelsData = new ArrayList<Object>();
        MicroServiceModels testData = new MicroServiceModels();
        testData.setVersion("1707.4.1.2-Junit");
        microServiceModelsData.add(testData);
        // mock the getDataById() call with the same MS model name
        when(commonClassDao.getDataById(MicroServiceModels.class, "modelName", "DkatPolicyBody"))
                .thenReturn(microServiceModelsData);
        controller.getDCAEMSTemplateData(request, response);
        assertTrue(
                response.getContentAsString() != null && response.getContentAsString().contains("dcaeModelData"));
        logger.debug("response: " + response.getContentAsString());
    } catch (Exception e) {
        logger.error("testGetDCAEMSTemplateData", e);
    }
    logger.debug("testGetDCAEMSTemplateData: exit");
}