Moved some reusable parts from the particle filter test to the header