Added Testcases and fixed a bug with the distance-sensor-implementation in the formula editor