title: Junit EasyMock, resultSet.getBigDecimal("") returns null value
body: <p>I have built a mock object using EasyMock and PowerMock. When I set expect behavior for getBigDecimal("") method it is returning <code>null</code>.</p>
  
  <pre><code>@Test
  public void getProductPriceContractInfo_v1_1Test() throws Exception{
  
      GetSPDProductPricePersistor productPricePersistor = new GetSPDProductPricePersistor();
      ProductPriceAndContractRequest_v1_1 productPriceAndContractRequest = new ProductPriceAndContractRequest_v1_1();
     /* set all request parameters in productPriceAndContractRequest --- */
  
      PowerMock.mockStatic(DataSourceManager.class); 
      DataSourceManager dBAccessor = PowerMock.createMock(DataSourceManager.class);
      EasyMock.expect(DataSourceManager.getInstance()).andReturn(dBAccessor).anyTimes();
      EasyMock.expect(DataSourceManager.freeConnection((Connection)EasyMock.anyObject(), EasyMock.anyObject(),
              EasyMock.anyObject())).andReturn(true);
  
      Connection connection = EasyMock.createMock(Connection.class);  
      PreparedStatement ps = EasyMock.createMock(PreparedStatement.class);    
  
      EasyMock.expect(dBAccessor.getConnection(EasyMock.anyString())).andReturn(connection).anyTimes();       
  
      connection.close();
      connection.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED);
      EasyMock.expect(connection.prepareStatement((String)EasyMock.anyObject())).andReturn(ps);
  
      ResultSet rs = EasyMock.createMock(ResultSet.class);
      EasyMock.expect(rs.next()).andReturn(true);
      EasyMock.expect(rs.next()).andReturn(false);
      EasyMock.expect(rs.getString("")).andReturn("Y").times(4);
      EasyMock.expect(rs.getBigDecimal("")).andReturn((BigDecimal) EasyMock.anyObject()).anyTimes();
      EasyMock.expect(rs.getBigDecimal("")).andReturn((BigDecimal) EasyMock.anyObject()).anyTimes();
      EasyMock.expect(rs.getBigDecimal((""))).andReturn((BigDecimal) EasyMock.anyObject()).anyTimes();
      EasyMock.expect(rs.getDate("")).andReturn((java.sql.Date) EasyMock.anyObject()).anyTimes();
      EasyMock.expect(rs.getBigDecimal("")).andReturn(BigDecimal.TEN).anyTimes();
      EasyMock.expect(rs.getBigDecimal("")).andReturn((BigDecimal) EasyMock.anyObject()).anyTimes();
      EasyMock.expect(rs.getBigDecimal("")).andReturn(BigDecimal.valueOf(987654L)).anyTimes();
      EasyMock.expect(rs.getInt("")).andReturn(5).anyTimes();
      EasyMock.expect(rs.getString("")).andReturn("").anyTimes();
      EasyMock.expect(rs.getString("")).andReturn("").anyTimes();
      EasyMock.expect(rs.getString("")).andReturn("").anyTimes();
  
      EasyMock.expect(ps.executeQuery()).andReturn(rs);   // returning ResultSet          
      EasyMock.expect(ps.executeQuery()).andReturn(rs);
  
  
      ps.setString(EasyMock.anyInt(),String.valueOf(EasyMock.anyInt()));  
      ps.setString(EasyMock.anyInt(),String.valueOf(EasyMock.anyInt()));
      ps.setString(EasyMock.anyInt(),String.valueOf(EasyMock.anyInt()));  
      ps.setString(EasyMock.anyInt(),String.valueOf(EasyMock.anyInt()));
      ps.setString(EasyMock.anyInt(),String.valueOf(EasyMock.anyInt()));
      ps.setString(EasyMock.anyInt(),String.valueOf(EasyMock.anyInt()));  
      ps.setString(EasyMock.anyInt(),String.valueOf(EasyMock.anyInt()));
      ps.close();
  
      PowerMock.expectLastCall().anyTimes();  
  
      PowerMock.replay(DataSourceManager.class);
      PowerMock.replay(dBAccessor);
      EasyMock.replay(connection);
      EasyMock.replay(ps);
      EasyMock.replay(rs);
  
  
      ProductPriceAndContractResponse_v1_1 response = (ProductPriceAndContractResponse_v1_1)productPricePersistor.getProductPriceContractInfo_v1_1(productPriceAndContractRequest);
      assertNotNull(response);
  }
  </code></pre>
  
  <p>When I debug it,</p>
  
  <pre><code>   public BaseResponse getProductPriceContractInfo_v1_1 (parameters) {
          Connection connection = null;
  
          PreparedStatement ps = null;
  
          ResultSet rs = null;
  
          try {
              connection = getConnection(ProductPricingInfoConstants.SPD_ODS_DATASOURCE_JNDI); // class method call
              ps = connection.prepareStatement(sqlQuery.toString());
              ps.setString(1, custNo);
              ps.setString(2, divNo);
              //made changes for 14.5 CI Release--START
               ps.setString(3, custNo);
               ps.setString(4, divNo); //PCRD-15.2 Specialty Online Requirements-Batch I
  
               int index = 5; //PCRD-15.2 Specialty Online Requirements-Batch I
  
              //made changes for 14.5 CI Release--END
              for (String cin : itmLst) {
                  ps.setString(index++, cin);
              }
  
              rs = ps.executeQuery();
  
              if (null != rs) {
                  ContractInfo contractInfo;
                  ProductPriceInfo productPriceInfo;
  
                  while (rs.next()) {
                      productPriceInfo = new ProductPriceInfo();
  
                      String str = rs.getString("")
                      productPriceInfo.setAltProductContract();
  
                      int num = rs.getInt("");
  
                      BigDecimal cntrNumber = rs.getBigDecimal("");
                      productPriceInfo.setContractNumber(cntrNumber.toString());
  }
  </code></pre>
  
  <p>I got expected value in <code>num</code> and <code>str</code>  variable but got <code>null</code> value in <code>cntrNumber</code> variable.</p>