Add tests and fix bug which test find out