Improve tests

This adds a return value of 400 for bad input