Added test for background mode