Hmm, I have a money object that allows me to add other money objects into it.
I tried assertEquals() in java for testing out if my code if okay, but then it fai
You could write your tests to compare fields:
Money m1 = new Money(money1.getCurrency(),new Value(22,70));
Money m2 = new Money(money1.getCurrency(),new Value(22,70)).add(money2);
assertEquals("currencies differ", m1.getCurrency(), m2.getCurrency());
assertEquals("values differ", m1.getValue(), m2.getValue());
You didn't override equals() method from Object class in your Money class. If so, objects are compared by their references, which are different in this case.
Here you can find rules for implementing equals.