@Test
public void testSizeShouldBeSizeWhenNumberOfOctetsMoreWhenStartIsZero()
throws Exception {
final long lessThanNumberOfOctets = NUMBER_OF_OCTETS - 1;
PartialFetchBodyElement element = new PartialFetchBodyElement(
mockBodyElement, 0, NUMBER_OF_OCTETS);
mockery.checking(new Expectations() {{
oneOf(mockBodyElement).size();will(returnValue(new Long(lessThanNumberOfOctets)));
}});
assertEquals("Size is less than number of octets so should be size",
lessThanNumberOfOctets, element.size());
}