@@ -0,0 +1,1787 @@
+/*%0A * Copyright (c) 2012 Mateusz Parzonka, Eric Bodden%0A * All rights reserved. This program and the accompanying materials%0A * are made available under the terms of the Eclipse Public License v1.0%0A * which accompanies this distribution, and is available at%0A * http://www.eclipse.org/legal/epl-v10.html%0A *%0A * Contributors:%0A * Mateusz Parzonka - initial API and implementation%0A */%0Apackage prm4j.indexing.map;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport org.junit.Test;%0A%0Apublic class MinimalMapTest %7B%0A%0A    @Test%0A    public void size_1() throws Exception %7B%0A%09MinimalMap%3CMockEntry%3E map = new MockMap();%0A%09assertEquals(0, map.size());%0A%09String a = %22a%22;%0A%09map.get(a);%0A%09assertEquals(1, map.size());%0A%09map.get(a);%0A%09assertEquals(1, map.size());%0A%09map.get(%22b%22);%0A%09assertEquals(2, map.size());%0A    %7D%0A%0A    @Test%0A    public void get_1() throws Exception %7B%0A%09MinimalMap%3CMockEntry%3E map = new MockMap();%0A%09String a = %22a%22;%0A%09MockEntry x = map.get(a);%0A%09MockEntry y = map.get(a);%0A%09assertEquals(x, y);%0A    %7D%0A%0A    static class MockMap extends MinimalMap%3CMockEntry%3E %7B%0A%0A%09@Override%0A%09protected MockEntry%5B%5D createInitialArray(int size) %7B%0A%09    return new MockEntry%5Bsize%5D;%0A%09%7D%0A%0A%09@Override%0A%09protected MockEntry createEntry(Object key, int hashCode) %7B%0A%09    return new MockEntry(key, hashCode);%0A%09%7D%0A%0A    %7D%0A%0A    static class MockEntry implements MinimalMapEntry%3CMockEntry%3E %7B%0A%0A%09private final Object key;%0A%09private final int hashCode;%0A%09private MockEntry next;%0A%0A%09public MockEntry(Object key, int hashCode) %7B%0A%09    this.key = key;%0A%09    this.hashCode = hashCode;%0A%09%7D%0A%0A%09@Override%0A%09public int getHashCode() %7B%0A%09    return hashCode;%0A%09%7D%0A%0A%09@Override%0A%09public Object getKey() %7B%0A%09    return key;%0A%09%7D%0A%0A%09@Override%0A%09public MockEntry next() %7B%0A%09    return next;%0A%09%7D%0A%0A%09@Override%0A%09public void setNext(MockEntry nextEntry) %7B%0A%09    next = nextEntry;%0A%09%7D%0A%0A    %7D%0A%0A%7D%0A

Add initial tests for MinimalMap