Add Prepare method
Move integration tests into a separated file