public final void hasSize ( int expectedSize ) { checkArgument ( expectedSize >= 0 , "expectedSize(%s) must be >= 0" , expectedSize ) ; int actualSize = size ( actual ( ) ) ; check ( "size()" ) . that ( actualSize ) . isEqualTo ( expectedSize ) ; }
Fails if the subject does not have the given size .