ack: improve test by performing a search

Closes #26500.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>