use try instead of either, and fix hanging problem with all()
add powermock