@Test
public void testCreateModelList() {

	ResponseModelData responseModelData = new ResponseModelData();
	List<ModelDetail> modelList = responseModelData.createModelList(swagger);
	Set<String> expectedTitles = swagger.getDefinitions().keySet();
	
	for(ModelDetail md : modelList){
		String actualTitle = md.getModelTitle();
		assertTrue(expectedTitles.contains(actualTitle));
	}
	
	 // Unit test for  ExtremeSearchResult with string parameter
	int extremeSearchResultIndex = 2;
	int destinationModelParamIndex= 0;
	ModelDetail modelDetail = modelList.get(extremeSearchResultIndex); 
	// Extracting element 'destination'
	ModelParameter modelParameterForExtremeSearchResult = modelDetail.getModelParameterList().get(destinationModelParamIndex); //model list to param list
	assertEquals("destination", modelParameterForExtremeSearchResult.getName());
	assertThat(modelParameterForExtremeSearchResult.getDescription(),containsString("city or airport"));
	assertEquals("string", modelParameterForExtremeSearchResult.getType());
	
	
	// Unit test for  LowFareSearch with array[references] parameter
	int lowFareSearchIndex = 3;
	int resultsModelParamIndex = 1;
	ModelDetail modelDetailForLowFareSearch = modelList.get(lowFareSearchIndex);
	// Extracting element 'results'
	ModelParameter modelParameterForResults = modelDetailForLowFareSearch.getModelParameterList().get(resultsModelParamIndex); 
	assertEquals("results", modelParameterForResults.getName());
	assertEquals("array", modelParameterForResults.getType());
	assertEquals("LowFareSearchResult", modelParameterForResults.getReferenceModel());
}