Added solution for #1005
Merge branch 'master' of https://github.com/YaMike/java_tests