added find by AttributeIs and some minor refactoring changes in tests