Issue #514 completed. Integration tests were added