3 import junit.framework.TestCase;
4 import org.apidesign.apifest08.currency.ConvertorCurrency;
7 /** Write a test that works with version from task A and fails with version B.
9 public class CurrencyTest extends TestCase {
10 public CurrencyTest(String n) {
14 public void testCompatibility() throws Exception {
15 ConvertorCurrency cur1 = ConvertorCurrency.getInstance("CZK");
16 ConvertorCurrency cur2 = ConvertorCurrency.getInstance("CZK");
18 assertNotSame("Two different instances", cur1, cur2);
19 if (cur1.equals(cur2)) {
20 fail("They are even not equal in first version");