Some minor tweaks and JUnit tests for InMemoryRepository classes