Ninja class and tests