Add unit tests for Diagram search in a resource