Fix [SonarQube] Loose Coupling (Avoid using implementation types like
'HashSet'; use the interface instead)
Add constructor
Replace dynamic loggers with static class logger
Add javadoc to constructor
Refactor parameter names for descriptiveness
Move parameters to class fields
Refactor parameter name for descriptiveness
Fix [SonarQube] Generic exceptions Error, RuntimeException, Throwable
and Exception should never be thrown (Define and throw a dedicated
exception instead of using a generic one)

Narrow try block to just the relevant method call