@Test
public void SelectionWithCallstackVisibilityTest() throws Exception {

  // Selection with callstack information
  Component component = myDetailsView.getComponent();
  Memory.AllocationStack stack = Memory.AllocationStack.newBuilder().setFullStack(
    Memory.AllocationStack.StackFrameWrapper.newBuilder().addFrames(
      Memory.AllocationStack.StackFrame.newBuilder().setClassName("MockClass").setMethodName("MockMethod").setLineNumber(1)))
    .build();
  FakeInstanceObject instance = new FakeInstanceObject.Builder(myFakeCaptureObject, 1, "DUMMY_CLASS").setAllocationStack(stack).build();
  myFakeCaptureObject.addInstanceObjects(ImmutableSet.of(instance));
  myStage.selectCaptureDuration(
    new CaptureDurationData<>(1, false, false, new CaptureEntry<CaptureObject>(new Object(), () -> myFakeCaptureObject)),
    null);
  myStage.selectInstanceObject(instance);
  assertTrue(component.isVisible());
}