fixed overloading of getAllComponentsInView; added unit testcase