added braces, sonar want it
added security prompt, now throws an exception, removed technical debt
added Test for the security prompt