@@ -0,0 +1,1049 @@
+package com.wildducktheories.api.impl;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0Aimport com.wildducktheories.api.API;%0A%0Apublic class APIManagerTest %7B%0A%0A%09static class TestAPI implements API %7B%0A%0A%09%09public boolean reset = false;%0A%0A%09%09@Override%0A%09%09public void reset() %7B%0A%09%09%09reset = true;%0A%09%09%7D%0A%0A%09%7D%0A%0A%09static class TestAPIManager extends AbstractAPIManagerImpl%3CTestAPI%3E%0A%09%7B%0A%09%09public TestAPI create()%0A%09%09%7B%0A%09%09%09return new TestAPI();%0A%09%09%7D;%0A%09%7D%0A%0A%09/**%0A%09 * Test that resets causes a different object to be allocated. That the same%0A%09 * object will be returned without a reset and that the reset method is called on reset.%0A%09 */%0A%09@Test%0A%09public void testReset() %7B%0A%09%09final  TestAPIManager manager = new TestAPIManager();%0A%0A%09%09TestAPI api1 = manager.get();%0A%09%09TestAPI api2 = manager.get();%0A%09%09Assert.assertFalse(api1.reset);%0A%09%09manager.reset();%0A%09%09TestAPI api3 = manager.get();%0A%0A%09%09Assert.assertNotNull(api1);%0A%09%09Assert.assertNotNull(api3);%0A%09%09Assert.assertSame(api1, api2);%0A%09%09Assert.assertNotSame(api1, api3);%0A%09%09Assert.assertTrue(api1.reset);%0A%09%09Assert.assertFalse(api3.reset);%0A%09%7D%0A%7D%0A

Add a test for the reset case.