Cyclomatic complexity #13 implemented with tests