public function shouldFilterIteratorElements()
{
//given
$iterator = new \ArrayIterator(array('a', 'pref_a', 'pref_b', 'b'));
//when
$result = FluentIterator::from($iterator)->filter(FluentFunctions::startsWith('pref'))->reindex();
//then
$this->assertEquals(array('pref_a', 'pref_b'), $result->toArray());
}