public function findByAutoScalingGroupNameReturnsExpectedCollection()
{
$autoScalingClient = $this->getAutoScalingGroupClientMock(['describeAutoScalingGroups']);
$autoScalingClient->method('describeAutoScalingGroups')->willReturn(new \Aws\Result(['AutoScalingGroups' => [['AutoScalingGroupARN' => 'arn:1234', 'AutoScalingGroupName' => 'GroupDummy-One-Asg'], ['AutoScalingGroupARN' => 'arn:5678', 'AutoScalingGroupName' => 'GroupTest-One-Asg'], ['AutoScalingGroupARN' => 'arn:5465', 'AutoScalingGroupName' => 'GroupTest-Two-Asg']]]));
$profileManager = $this->getProfileManagerMock(['getClient']);
$profileManager->method('getClient')->willReturn($autoScalingClient);
$autoScalingRepository = new \AwsInspector\Model\AutoScaling\Repository('', $profileManager);
$result = $autoScalingRepository->findByAutoScalingGroupName('/^GroupTest-.*-Asg/');
$this->assertInstanceOf('\\AwsInspector\\Model\\Collection', $result);
$this->assertSame(2, $result->count());
$this->assertSame('GroupTest-One-Asg', $result->getFirst()->getAutoScalingGroupName());
}