avoid double call in test
add rest-delay macro

make sure enclosed code is called when HTTP request is made, not when
server is started