* @version $Revision: 813776 $
*/
public class DefaultInflightRepositoryTest extends ContextTestSupport {
public void testDefaultInflightRepository() throws Exception {
InflightRepository repo = new DefaultInflightRepository();
assertEquals(0, repo.size());
Exchange e1 = new DefaultExchange(context);
repo.add(e1);
assertEquals(1, repo.size());
Exchange e2 = new DefaultExchange(context);
repo.add(e2);
assertEquals(2, repo.size());
repo.remove(e2);
assertEquals(1, repo.size());
repo.remove(e1);
assertEquals(0, repo.size());
}