// Validate the generated metadata based on object type
Map<String, Object> expectedObjectMetadata = new HashMap<>();
if (expectedTarget instanceof Account) {
Account tAccount = (Account) expectedTarget;
expectedObjectMetadata.put("targetFuid", tAccount.getFuid());
expectedObjectMetadata.put("targetName", tAccount.getName());
} else if (expectedTarget instanceof InventoryItem) {
InventoryItem tInventoryItem = (InventoryItem) expectedTarget;
Connection tConnection = tInventoryItem.getConnection();
ConnectionProvider tConnectionProvider =
applicationManager.getConnectionProviderFactory()