Sophisticate conditions further and fix test

Just added another condition and fixed the test by simplifying it.

Signed-off-by: Konrad Reiche <konrad.reiche@fokus.fraunhofer.de>