@RunWith(Mule.class) public class MyLibraryTest { @Test public void testMyMethod() { Specification spec = Specification.create("My Method Test") Result result = Mule.runner().run(spec); Assert.assertTrue(result.isSuccess()); } }