@Test
public void testResampling() {

    pf = new ParticleFilterTestable();
    pf.setNumParticles(4);
    Particle tmp = new Particle(1.f, 2.f, 0.25f);
    pf.particleList.add(tmp);
    tmp = new Particle(3.f, 4.f, 0.01f);
    pf.particleList.add(tmp);
    tmp = new Particle(5.f, 6.f, 0.73f);
    pf.particleList.add(tmp);
    tmp = new Particle(7.f, 8.f, 0.01f);
    pf.particleList.add(tmp);
    pf.sigmaSensor = 1.f;
    pf.setScale(1.f);
    pf.resampling();
    assertEquals(1.1f, pf.particleList.get(0).getX(), 0.01f);
    assertEquals(5.1f, pf.particleList.get(1).getX(), 0.01f);
    assertEquals(5.1f, pf.particleList.get(2).getX(), 0.01f);
    assertEquals(5.1f, pf.particleList.get(3).getX(), 0.01f);
}