added call to attachDefaultListeners if method has been defined
added abstract factory test