@Test public void shouldGetContext() { String context = operationContext.getContextOpId(); for (int i = 0; i < 10; i++) { String contextAgain = operationContext.getContextOpId(); assertThat(contextAgain, equalTo(context)); } }
public String getContextOpId() { return operationContext.get().isEmpty() ? null : operationContext.get().peek().getOpId(); }
OperationContext { public String getContextOpId() { return operationContext.get().isEmpty() ? null : operationContext.get().peek().getOpId(); } }
OperationContext { public String getContextOpId() { return operationContext.get().isEmpty() ? null : operationContext.get().peek().getOpId(); }  }
OperationContext { public String getContextOpId() { return operationContext.get().isEmpty() ? null : operationContext.get().peek().getOpId(); }  void switchContext(String opId); void switchContext(Context context); String getContextOpId(); String getContextParentOpId(); Context getContext(); String getCommandContext(); void setCommandContext(String eventId); void clearContext(); String clearCommandContext(); String generateContext(); String generateContext(boolean preGenerated); String generateContext(@Nullable String parentOpId, boolean preGenerated); String startNewContext(long commandTimeout); }
OperationContext { public String getContextOpId() { return operationContext.get().isEmpty() ? null : operationContext.get().peek().getOpId(); }  void switchContext(String opId); void switchContext(Context context); String getContextOpId(); String getContextParentOpId(); Context getContext(); String getCommandContext(); void setCommandContext(String eventId); void clearContext(); String clearCommandContext(); String generateContext(); String generateContext(boolean preGenerated); String generateContext(@Nullable String parentOpId, boolean preGenerated); String startNewContext(long commandTimeout); static final String OP_ID; static final String COMMAND; static final char PARENT_OP_ID_DELIMITER; }