@@ -0,0 +1,2692 @@
+package org.mifosplatform.integrationtests.common;%0A%0Aimport com.google.gson.Gson;%0Aimport com.jayway.restassured.specification.RequestSpecification;%0Aimport com.jayway.restassured.specification.ResponseSpecification;%0A%0Aimport java.util.HashMap;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0Apublic class surveyHelper %7B%0A%0A    private static final String FULFIL_SURVEY_URL = %22/mifosng-provider/api/v1/survey/ppi_kenya_2009/clientId?tenantIdentifier=default%22;%0A%0A    public static Integer fulfilSurvey(final RequestSpecification requestSpec, final ResponseSpecification responseSpec) %7B%0A        return fulfilSurvey(requestSpec, responseSpec, %2204 March 2011%22);%0A    %7D%0A%0A    public static Integer fulfilSurvey(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,%0A            final String activationDate) %7B%0A        System.out.println(%22---------------------------------FULFIL PPI ---------------------------------------------%22);%0A        return Utils.performServerPost(requestSpec, responseSpec,FULFIL_SURVEY_URL, getTestPPIAsJSON(), %22clientId%22);%0A    %7D%0A%0A    public static String getTestPPIAsJSON() %7B%0A        final HashMap%3CString, String%3E map = new HashMap%3CString, String%3E();%0A%0A        map.put(%22date%22, %222014-05-19 00:00:00%22);%0A        map.put(%22ppi_household_members_cd_q1_householdmembers%22,%22107%22);%0A        map.put(%22ppi_highestschool_cd_q2_highestschool%22,%22112%22);%0A        map.put(%22ppi_businessoccupation_cd_q3_businessoccupation%22,%22116%22);%0A        map.put(%22dateFormat%22, %22dd MMMM yyyy%22);%0A        map.put(%22locale%22, %22en%22);%0A        map.put(%22ppi_habitablerooms_cd_q4_habitablerooms%22, %22120%22);%0A%0A        map.put(%22ppi_floortype_cd_q5_floortype%22, %22124%22);%0A        map.put(%22ppi_lightingsource_cd_q6_lightingsource%22, %22126%22);%0A        map.put(%22ppi_irons_cd_q7_irons%22, %22128%22);%0A        map.put(%22ppi_mosquitonets_cd_q8_mosquitonets%22, %22132%22);%0A        map.put(%22ppi_towels_cd_q9_towels%22, %22134%22);%0A        map.put(%22ppi_fryingpans_cd_q10_fryingpans%22, %22138%22);%0A%0A        System.out.println(%22map : %22 + map);%0A        return new Gson().toJson(map);%0A    %7D%0A%0A    public static void verifySurveyCreatedOnServer(final RequestSpecification requestSpec, final ResponseSpecification responseSpec,%0A            final Integer generatedClientID) %7B%0A        System.out.println(%22------------------------------CHECK CLIENT DETAILS------------------------------------%5Cn%22);%0A        final String SURVEY_URL = %22/mifosng-provider/api/v1/Survey/ppi_kenya_2009/clientid/entryId%22 + generatedClientID + %22?tenantIdentifier=default%22;%0A        final Integer responseClientID = Utils.performServerGet(requestSpec, responseSpec, SURVEY_URL, %22id%22);%0A        assertEquals(%22ERROR IN CREATING THE CLIENT%22, generatedClientID, responseClientID);%0A    %7D%0A%0A%0A%7D

work in porgress integration test