Add the following dependencies to your pom.xml file to get started using Needle:


Implementing your first Needle Test:

public class UserDaoTest {

    public DatabaseRule databaseRule = new DatabaseRule();

    public NeedleRule needleRule = new NeedleRule(databaseRule);

    private UserDao userDao;

    public void testFindByUsername() throws Exception {
        final User user = new UserTestdataBuilder(

        User userFromDb =
            userDao.findBy(user.getUsername(), user.getPassword());

        Assert.assertEquals(user.getId(), userFromDb.getId());

For the documentation and more examples please refer to the Needle Documentation.