// tests
// ------------------------------------------------------------------------
public void testCollectionCallsAreProxied() {
final InvocationCounter proxied = new InvocationCounter();
ByteCollection collection = new BaseProxyByteCollection() {
protected ByteCollection getProxiedCollection() {
return proxied;
}
};
assertEquals(0,proxied.getAddCount());
collection.add((byte)1);
assertEquals(1,proxied.getAddCount());
assertEquals(0,proxied.getAddAllCount());
collection.addAll(null);
assertEquals(1,proxied.getAddAllCount());
assertEquals(0,proxied.getClearCount());
collection.clear();
assertEquals(1,proxied.getClearCount());
assertEquals(0,proxied.getContainsCount());
collection.contains((byte)1);
assertEquals(1,proxied.getContainsCount());
assertEquals(0,proxied.getContainsAllCount());
collection.containsAll(null);
assertEquals(1,proxied.getContainsAllCount());
assertEquals(0,proxied.getIsEmptyCount());
collection.isEmpty();
assertEquals(1,proxied.getIsEmptyCount());
assertEquals(0,proxied.getIteratorCount());
collection.iterator();
assertEquals(1,proxied.getIteratorCount());
assertEquals(0,proxied.getRemoveAllCount());
collection.removeAll(null);
assertEquals(1,proxied.getRemoveAllCount());
assertEquals(0,proxied.getRetainAllCount());
collection.retainAll(null);
assertEquals(1,proxied.getRetainAllCount());
assertEquals(0,proxied.getRemoveElementCount());
collection.removeElement((byte)1);
assertEquals(1,proxied.getRemoveElementCount());
assertEquals(0,proxied.getSizeCount());
collection.size();
assertEquals(1,proxied.getSizeCount());
assertEquals(0,proxied.getToArrayByteArrayCount());
collection.toArray(new byte[0]);
assertEquals(1,proxied.getToArrayByteArrayCount());
assertEquals(0,proxied.getToArrayCount());
collection.toArray();
assertEquals(1,proxied.getToArrayCount());
assertEquals(0,proxied.getToStringCount());
collection.toString();
assertEquals(1,proxied.getToStringCount());
assertEquals(0,proxied.getEqualsCount());
collection.equals(null);
assertEquals(1,proxied.getEqualsCount());
assertEquals(0,proxied.getHashCodeCount());
collection.hashCode();
assertEquals(1,proxied.getHashCodeCount());
}