@Test
public void testExactlyTwoDifferentExternalResourceNames() {
final String NAME1 = "testCache1", NAME2 = "testCache2";
Operation op1 = createOperation(NAME1), op2 = createOperation(NAME2);
SimpleFrameBuilder builder = new SimpleFrameBuilder();
builder.enter(new Operation().type(OperationType.HTTP));
builder.enter(op2);
builder.exit();
builder.enter(new Operation().type(OperationType.METHOD));
builder.enter(op1);
builder.exit();
builder.exit();
Frame frame = builder.exit();
Trace trace = Trace.newInstance(ApplicationName.valueOf("app"), TraceId.valueOf("0"), frame);
List<ExternalResourceDescriptor> externalResourceDescriptors =
(List<ExternalResourceDescriptor>) analyzer.locateExternalResourceName(trace);
assertNotNull("No descriptors extracted", externalResourceDescriptors);