private static EndPointAnalysis assertEndpointAnalysis(
      Trace trace, Frame grailsFrame, Frame httpFrame) {
    EndPointAnalysis ep = endPointAnalyzer.locateEndPoint(trace);
    assertNotNull("No analysis", ep);

    Operation operation = grailsFrame.getOperation();
    String resourceKey =
        GrailsControllerMethodEndPointAnalyzer.makeResourceKey(operation.getSourceCodeLocation());
    EndPointName epName = EndPointName.valueOf(resourceKey);
    assertEquals("Mismatched endpoint name", epName, ep.getEndPointName());

    assertEquals("Mismatched label", operation.getLabel(), ep.getResourceLabel());
    assertEquals(
        "Mismatched score",
        EndPointAnalysis.depth2score(FrameUtil.getDepth(grailsFrame)),
        ep.getScore());

    if (httpFrame == null) {
      assertEquals("Mismatched grails example", operation.getLabel(), ep.getExample());
    } else {
      String expected = EndPointAnalysis.createHttpExampleRequest(httpFrame);
      assertEquals("Mismatched http example", expected, ep.getExample());
    }

    return ep;
  }
 @Test
 public void locateEndPointNoGrails() {
   FrameBuilder b = new SimpleFrameBuilder();
   Operation httpOp = new Operation().type(OperationType.HTTP);
   b.enter(httpOp);
   b.enter(new Operation());
   Frame simpleFrame = b.exit();
   assertNotNull("No simple frame", simpleFrame);
   Frame httpFrame = b.exit();
   Trace trace = Trace.newInstance(app, TraceId.valueOf("0"), httpFrame);
   EndPointAnalysis ep = endPointAnalyzer.locateEndPoint(trace);
   assertNull("Unexpected result: " + ep, ep);
 }