Zend certified PHP/Magento developer

magento 2 loadbyattribute method

Load product by attribute i have using the following code

$attribute =’test1′;
$objectManager =MagentoFrameworkAppObjectManager::getInstance();
$product =$objectManager->get(‘MagentoCatalogModelProduct’);
$product = $product->loadByAttribute(‘attributename’,$attribute]);

but i have the format of values in attributename field like

test1|test2|test3

then how do i check this loadByAttribute() method