Now java tasks extends from abstract TaskUnit class (instead of using duck typing).