added test code for externalId lookup only