Added JUnit tests to Pile