diff --git a/Tests/Repository/BowerPrivateRepositoryTest.php b/Tests/Repository/BowerPrivateRepositoryTest.php
index <HASH>..<HASH> 100644
--- a/Tests/Repository/BowerPrivateRepositoryTest.php
+++ b/Tests/Repository/BowerPrivateRepositoryTest.php
@@ -14,7 +14,6 @@ namespace Fxp\Composer\AssetPlugin\Tests\Repository;
 use Composer\Config;
 use Composer\EventDispatcher\EventDispatcher;
 use Composer\IO\IOInterface;
-use Fxp\Composer\AssetPlugin\Exception\InvalidCreateRepositoryException;
 use Fxp\Composer\AssetPlugin\Repository\BowerPrivateRepository;
 
 /**
@@ -72,11 +71,12 @@ class BowerPrivateRepositoryTest extends AbstractAssetsRepositoryTest
         );
     }
 
+    /**
+     * @expectedException \Fxp\Composer\AssetPlugin\Exception\InvalidCreateRepositoryException
+     * @expectedExceptionMessage The "repository.url" parameter of "existing" bower asset package must be present for create a VCS Repository
+     */
     public function testWhatProvidesWithInvalidPrivateUrl()
     {
-        $this->expectException(InvalidCreateRepositoryException::class);
-        $this->expectExceptionMessage('The "repository.url" parameter of "existing" bower asset package must be present for create a VCS Repository');
-
         $name = $this->getType().'-asset/existing';
         $rfs = $this->replaceRegistryRfsByMock();
         $rfs->expects($this->any())
Fix call undefined expectException method with old phpunit