public function testInit($name, $value, $exception)
{
if ($exception) {
try {
$status = ImageStatus::$name();
$this->assertTrue(false, 'Exception must be thrown here.');
} catch (\BadMethodCallException $e) {
$this->assertTrue(true);
}
} else {
$status = ImageStatus::$name();
$this->assertInstanceOf($this->getOpenStackClassName(self::TYPE_CLASS_NAME), $status);
$this->assertEquals($value, (string) $status);
}
}