Fix problem in the tests and add a simple tests