Imports cleaned-up
Refactoring: removed duplication, introduced utility
Added test that is unexpectedly "error-red" not "failure-red" (NPE!)