diff --git a/tests/Core/Command/User/SettingTest.php b/tests/Core/Command/User/SettingTest.php
index 1ed275d66733906e6ad288c1c5ea9b0cada75b56..a40aeb748e80c88812ee2ad66bafa6e643fa25ed 100644
--- a/tests/Core/Command/User/SettingTest.php
+++ b/tests/Core/Command/User/SettingTest.php
@@ -37,9 +37,6 @@ class SettingTest extends TestCase {
 	/** @var \Symfony\Component\Console\Output\OutputInterface|\PHPUnit_Framework_MockObject_MockObject */
 	protected $consoleOutput;
 
-	/** @var \Symfony\Component\Console\Command\Command */
-	protected $command;
-
 	protected function setUp() {
 		parent::setUp();
 
@@ -58,8 +55,23 @@ class SettingTest extends TestCase {
 		$this->consoleOutput = $this->getMockBuilder('Symfony\Component\Console\Output\OutputInterface')
 			->disableOriginalConstructor()
 			->getMock();
+	}
+
+	public function getCommand(array $methods = []) {
+		if (empty($methods)) {
+			return new Setting($this->userManager, $this->config, $this->connection);
+		} else {
+			$mock = $this->getMockBuilder('OC\Core\Command\User\Setting')
+				->setConstructorArgs([
+					$this->userManager,
+					$this->config,
+					$this->connection,
+				])
+				->setMethods($methods)
+				->getMock();
+			return $mock;
+		}
 
-		$this->command = new Setting($this->userManager, $this->config, $this->connection);
 	}
 
 	public function dataCheckInput() {
@@ -201,11 +213,25 @@ class SettingTest extends TestCase {
 				->willReturn($user);
 		}
 
+		$command = $this->getCommand();
 		try {
-			$this->invokePrivate($this->command, 'checkInput', [$this->consoleInput]);
+			$this->invokePrivate($command, 'checkInput', [$this->consoleInput]);
 			$this->assertFalse($expectedException);
 		} catch (\InvalidArgumentException $e) {
 			$this->assertEquals($expectedException, $e->getMessage());
 		}
 	}
+
+	public function testCheckInputExceptionCatch() {
+		$command = $this->getCommand(['checkInput']);
+		$command->expects($this->once())
+			->method('checkInput')
+			->willThrowException(new \InvalidArgumentException('test'));
+
+		$this->consoleOutput->expects($this->once())
+			->method('writeln')
+			->with('<error>test</error>');
+
+		$this->assertEquals(1, $this->invokePrivate($command, 'execute', [$this->consoleInput, $this->consoleOutput]));
+	}
 }