class UserRepository {

    @Transactional(SUPPORTS)
    public User find(final long id) {
        return em.find(User.class, id);
    }

}

class UserRepositoryTest {

    @Resource
    private DataSource dataSource;
    @Rule
    public final TestRule rules;
    @Inject
    private UserRepository repository;

    @Test
    @DataSet("datasets/users.yml")
    public void find1() {

        assertEquals("John Smith", repository.find(1L).getName());
        assertEquals("Clark Kent", repository.find(2L).getName());
    }

}