Fix #9 add integration tests

[skip ci]