Add shutdown test

Signed-off-by: Michael Buesch <m@bues.ch>