title: Why Json ask for no argument constructor for Junit test?
body: <p>I have a problem deserializing a JSON string using Jackson. I am getting Error : com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class RatingDMO]: can not instantiate from JSON object (need to add/enable type information?)</p>
  
  <p>I have the fields mapped to the JSON file and parameters to it are available as properties AND have the same type.</p>
  
  <p><strong>Note :- If I provide the no-arg constructor(just for checking if it works), the Test works.</strong> </p>
  
  <p>I can't provide/leave a default constructor in my code as I have few final fields in the model.</p>
  
  <p>mapper.readValue(new File("ratingRequest.json"), RatingDMO.class);</p>
  
  <p>JSON File :- </p>
  
  <pre><code>{
      "company": "Test",
      "state": "NJ",
      "lob": "PA",
      "channel": "IA",
      "username": "GlobalBatchUser",
      "password": "GlobalBatchUser",
      "policyNumber": "Test",
      "policyKey": 7267,
      "transactionType": "Quote",
      "evaluationType": null,
      "clientID": null,
      "policyTerm": "6",
      "effectiveDate": "01/01/1980",
      "policyXML": null,
      "firstName": null,
      "lastName": null,
      "businessName": null,
      "city": null,
      "zip": null,
      "effectiveDtStart": "06/06/2013",
      "effectiveDtEnd": "06/06/2014",
      "searchType": "uw1",
      "uuid": null,
      "policyStatusCodes": [],
      "eAdvisorCoverages": {},
      "customCoverages": {},
      "defaultCoverages": {},
      "action": null,
      "type": null,
      "selectedCoverage": null,
      "motorClubMember": true,
      "selectedSubCoveres": null,
      "customRated": true,
      "policyDMO": {
      "policyKey": 0,
      "company": "HP",
      "state": "NJ",
      "lob": "auto",
      "channel": null,
      "addresses": [
          {
              "addressId": 0,
              "addrLine1Txt": "20 MARTIN RD",
              "addrLine2Txt": null,
              "addrLine3Txt": null,
              "addrLine4Txt": null,
              "cityName": "LIVINGSTON",
              "cityAliasName": null,
              "countyName": null,
              "countryCd": null,
              "districtCd": null,
              "houseNum": null,
              "poBoxInd": null,
              "stateCd": "NJ",
              "zip": "07039",
              "zipPlusFour": null,
              "addressType": "ADDRESS_RESIDENCE_KEY",
              "vehicleId": 0
          },
          {
              "addressId": 0,
              "addrLine1Txt": "20 MARTIN RD",
              "addrLine2Txt": null,
              "addrLine3Txt": null,
              "addrLine4Txt": null,
              "cityName": "LIVINGSTON",
              "cityAliasName": null,
              "countyName": null,
              "countryCd": null,
              "districtCd": null,
              "houseNum": null,
              "poBoxInd": null,
              "stateCd": "NJ",
              "zip": "07039",
              "zipPlusFour": null,
              "addressType": "ADDRESS_MAILING_KEY",
              "vehicleId": 0
          }
      ],
      "policyInfo": {
          "policyKey": 0,
          "mailingAddrID": 0,
          "priorAddrID": 0,
          "residentialAddrId": 0,
          "billingAddrId": 0,
          "employerAddrId": 0,
          "policyNum": "Test",
          "policyEffDt": 1371614400000,
          "policyExpDt": null,
          "companyCD": null,
          "stateCD": "NJ",
          "term": 0,
          "emailId": "KSIRIPURAPU@PLYMOUTHROCK.COM",
          "faxNum": null,
          "homePhoneNum": null,
          "workPhoneNum": null,
          "mailingAddrIsSameInd": "Y",
          "plfCD": "HIPT",
          "affinityCD": null,
          "motorClubInd": null,
          "homeownerInd": null,
          "homeInsCarrierName": null,
          "empOrRetEduInstInd": null,
          "residenceInsTypeCD": null,
          "policyCancelledWithin3YRSIND": null,
          "declineEmailInd": null,
          "militaryServiceInd": null,
          "clueORDInd": null,
          "otherInsuranceBasicOrSpecialInd": null,
          "healthInsuranceCarrierName": null,
          "healthInsurancePolicyNumber": null,
          "transactionProgress": "1",
          "numOfAccidentInLoanedVehicle": null,
          "allInsuredInd": null,
          "medicareMediaidInd": null,
          "uwCompanyCd": null,
          "policyIssueNo": null,
          "associatedEduAffilatedOrgInd": null,
          "eDocumentsInd": null
      },
      "eligibility": [],
      "policyAgency": {
          "policyKey": 0,
          "branchID": null,
          "agencyID": null,
          "producerId": null,
          "agencyHierId": 23155,
          "agentLoginId": null,
          "userName": null,
          "userTypeCd": null,
          "emailAddressId": null,
          "referChannel": "Others"
      },
      "participants": [
          {
              "policyKey": 0,
              "participantId": 0,
              "firstName": "KHAGENDRA",
              "middleName": null,
              "lastName": "SIRIPURAPU",
              "suffix": null,
              "birthDate": null,
              "ssn": null,
              "fid": null,
              "gender": "",
              "licNum": null,
              "licStateCD": null,
              "maritalStatusCD": null,
              "relationshipToInsCD": "A",
              "businessName": null,
              "participantRole": "PRIMARY_INSURED"
          }
      ],
      "vehicles": [],
      "drivers": [
          {
              "driverId": 0,
              "firstName": "KHAGENDRA",
              "middleName": null,
              "lastName": "SIRIPURAPU",
              "licenseAtAge": 0,
              "licenseStatusCode": null,
              "defenseDriverCourseIndicator": null,
              "goodStudentIndicator": null,
              "driverTrainingIndicator": null,
              "awayAtSchoolIndicator": null,
              "incidents": null,
              "occupation": null,
              "insuredOnOther": null,
              "continuousCoverageIndicator": null,
              "priorLicenseNumber": null,
              "driverCourseDate": null,
              "driverCourseName": null,
              "firstLicenseNonUSA": null,
              "awayAtMilitaryIndicator": null,
              "sr22FilingIndicator": null,
              "otherPolicyCarrierName": null,
              "awayAtSchoolComment": null,
              "licenseOosPrior3YrsInd": "N",
              "licenseOosPrior3YearsStateCd": null,
              "advDriverTrainingDate": null,
              "defensiveDriverCourseDate": null,
              "otherPolicyTypeCode": null,
              "accidentPrvntCourseDate": null,
              "phoneNumber": null,
              "safetyPledgeInd": null,
              "accidents": null,
              "violations": null
          }
      ],
      "priorCarrier": {
          "priorBiLimits": null,
          "priorCarrName": null,
          "policyKey": 0,
          "continuousCoverageDesc": null,
          "lapsedReason": null,
          "numOfYearOfContinuousCoverage": null,
          "activeCurrentPoilcyInd": null
      },
      "discounts": null,
      "companionPolicy": null,
      "payment": null
  
  },
      "allInsuredInd": "Y",
      "medicareMediaidInd": "Y",
      "driversGreaterthan65": true
  }
  </code></pre>
  
  <p><strong>POJO Class :</strong> </p>
  
  <pre><code>public class RatingDMO implements Serializable {
  
      private static final long serialVersionUID = -433016040176969496L;
      private String company;
      private String state;
      private String lob;
      private String channel;
      private String username;
      private String password;
      private String policyNumber;
      private long policyKey;
      private String transactionType;
      private String evaluationType;
      private String clientID;
      private String policyTerm;
      private String effectiveDate;
      private String policyXML;
      private String webXML;
      private String firstName;
      private String lastName;
      private String businessName;
      private String city;
      private String zip;
      private String effectiveDtStart;
      private String effectiveDtEnd;
      private String searchType;
      private String uuid;
      private List&lt;String&gt; policyStatusCodes;
      private Map&lt;String,String&gt; eAdvisorCoverages;
      private Map&lt;String,String&gt; customCoverages;
      private Map&lt;String,String&gt; defaultCoverages;
      private String action;
      private String type;
      private String selectedCoverage;
      private boolean motorClubMember;
      private String selectedSubCoveres;
      private boolean customRated;
      private final PolicyDMO policyDMO;
      private final String allInsuredInd;
      private final String medicareMediaidInd;
      private final boolean driversGreaterthan65;
  
      public PolicyRatingRequestDMO(PolicyDMO policyDMO, String allInsuredInd, String medicareMediaidInd, boolean driversGreaterthan65){
          this.policyDMO = policyDMO;
          this.allInsuredInd = allInsuredInd;
          this.medicareMediaidInd = medicareMediaidInd;
          this.driversGreaterthan65 = driversGreaterthan65;
      }
  ... }
  </code></pre>