flocking example with tests