Added a test for peak detection