}
void assertHasSize(Description description, Object array, int expectedSize) {
assertNotNull(description, array);
if (expectedSize < 0) {
throw failures.failure(description, new BasicErrorMessageFactory("The expectedSize should not be negative"));
}
int sizeOfActual = sizeOf(array);
if (sizeOfActual != expectedSize) {
throw failures.failure(description, shouldHaveSize(array, sizeOfActual, expectedSize));
}