Index: C:/mifos/workspace2/mifos/test/org/mifos/application/productdefinition/business/LoanOfferingBOTest.java
===================================================================
--- C:/mifos/workspace2/mifos/test/org/mifos/application/productdefinition/business/LoanOfferingBOTest.java	(revision 12183)
+++ C:/mifos/workspace2/mifos/test/org/mifos/application/productdefinition/business/LoanOfferingBOTest.java	(working copy)
@@ -472,6 +472,37 @@
 		}
 	}
 
+	public void testBuildloanOfferingWithDuplicateFeeXXX() throws SystemException,
+		ApplicationException {
+		createIntitalObjects();
+		Date startDate = offSetCurrentDate(0);
+		LoanOfferingBO loanOffering = new LoanOfferingBO(TestObjectFactory
+				.getContext(), "Loan Offering", "LOAN", productCategory,
+				prdApplicableMaster, startDate, interestTypes,
+				new Money("1000"), new Money("3000"), 12.0, 2.0, 3.0,
+				(short) 20, (short) 1, (short) 12, false, true, false,
+				frequency, principalglCodeEntity, intglCodeEntity);
+		
+		FeeBO fee = TestObjectFactory.createOneTimeAmountFee("Loan One time ",
+					FeeCategory.LOAN, "100", FeePayment.UPFRONT);
+
+		LoanOfferingFeesEntity loanOfferingFees1 = 
+			new LoanOfferingFeesEntity(loanOffering, fee);			
+		loanOffering.addPrdOfferingFee(loanOfferingFees1);
+
+		// another fee for the proudct: which refers to the same fee 
+		// as the one above
+		LoanOfferingFeesEntity loanOfferingFees2 = 
+			new LoanOfferingFeesEntity(loanOffering, fee);			
+		loanOffering.addPrdOfferingFee(loanOfferingFees2);
+		
+		assertEquals("sam: I believe the business requirement is that the loan should not have fees that are essentially the same.", 
+				1, loanOffering.getLoanOfferingFees().size());
+
+		assertEquals("sam: I belive these two offering fees are considered identical from business requirement", 
+				true, loanOfferingFees1.equals(loanOfferingFees2));
+	}
+
 	public void testDefAmountNotBetweenMinMaxAmounts() {
 		PrdApplicableMasterEntity prdApplicableMaster = new PrdApplicableMasterEntity(
 				ApplicableTo.CLIENTS);
