Adds trap function test

To be used later on with noisy fitness