public function testVisit_WhenFilterByTypeThatIsNotSupported()
 {
     $queryBuilder = 'can be anything';
     $entityFieldNames = ['id', 'title', 'price'];
     $criteriaMock = $this->getMockBuilder(Criteria::class)->disableOriginalConstructor()->getMock();
     $criteriaMock->expects($this->exactly(2))->method('getType')->willReturn('notSupportedType');
     $criteriaMock->expects($this->once())->method('getKey')->willReturn('title');
     $this->queryFilterMock->expects($this->once())->method('getCriteria')->willReturn([$criteriaMock]);
     $this->commandCollectionMock->expects($this->once())->method('offsetGet')->with('notSupportedType')->willReturn(null);
     $this->setExpectedException('BusinessLogicLibrary\\QueryFilter\\Exception\\UnsupportedTypeException', 'Tried to filter by field "notSupportedType" that is not supported');
     $result = $this->testedObject->visit($queryBuilder, $entityFieldNames);
     $this->assertSame($queryBuilder, $result);
 }