@Override
  protected void setFileNameParser( FileNameParser parser ) {
    if ( !( parser instanceof ConnectionFileNameParser ) ) {
      throw new IllegalArgumentException( "Argument 'parser' is not an instance of 'ConnectionFileNameParser'." );
    }

    super.setFileNameParser( parser );
  }
@Test( expected = IllegalArgumentException.class )
  public void testSetFileNameParserThrowsIfIncorrectType() {
    try ( ConnectionFileProvider provider = new ConnectionFileProvider() ) {
      provider.setFileNameParser( mock( FileNameParser.class ) );
    }
  }