refactor: address code analysis violations
refactor: address code analysis violations in tests