Refactor tests a bit and organize imports

Signed-off-by: Joern Bernhardt <jb@campudus.com>