Integration tests are not as straightforward to code as unit tests because they really need to test an entire integration. For example, to test a database integration, you would need to set up this database before running the tests.
To address this issue and avoid the overhead of setting up an entire database just for executing a simple test, many people run integration tests with an in-memory database such as H2.1
The point here is that integration tests are more effective when running in an environment similar to the production environment. For example, an in-memory database ...