How to test Spring CrudRepository using @DataJpaTest in Spring boot 2.1.0.M4 using Junit 5

Do not mix @SpringBootTest with @DataJpaTest

From JavaDoc's one can read:

Annotation that can be used in combination with {@code @RunWith(SpringRunner.class)} for a typical JPA test. Can be used when a test focuses only on JPA components.

For full integration tests you should instead use @SpringBootTest

If you are looking to load your full application configuration, but use an embedded database, you should consider {@link SpringBootTest @SpringBootTest} combined with {@link AutoConfigureTestDatabase @AutoConfigureTestDatabase} rather than this annotation.