[backend] Adjust test searching behaviour + fix contracts.