testAllWhenAvailable added, and test case added.