added unit tests and call to $behavior->hasMethod in Component