Command implements Serializable { public String getAbsoluteUri(Type type) { return getElement(type).map(e -> e.getUri()).orElse(null); } Command(String absoluteUri);  Command(Command source); CollectionsTemplate<List<Behavior>, Behavior> templateBehaviors(); void validate(); boolean isRootDomainOnly(); CommandElementLinked root(); boolean isEvent(); Command createRootDomainCommand(); String getAliasUri(Type type); RefId<?> getRefId(Type type); String getAbsoluteUri(Type type); String getAlias(Type type); Optional<CommandElementLinked> getElement(Type type); CommandElementLinked getElementSafely(Type type); String getRelativeUri(String input); boolean isView(); String getAppAlias(); String getRootClientAlias(); CommandElement getRootDomainElement(); String getRootDomainAlias(); String getRootDomainUri(); String getAbsoluteDomainAlias(); String getAbsoluteDomainUri(); String getProcessAlias(); String getProcessUri(); String getAbsoluteAlias(); String getAbsoluteAliasWithAction(); String getAbsoluteAliasTillRootDomain(); String buildAlias(CommandElementLinked startElem); String buildAlias(Type endWhentype); String buildAlias(CommandElementLinked startElem, Type endWhentype); String buildUri(CommandElementLinked startElem); String buildUri(Type endWhenType); String buildUri(CommandElementLinked startElem, Type endWhenType); String traverseElements(CommandElementLinked startElem, BiConsumer<CommandElement, StringBuilder> cb); void traverseElements(CommandElementLinked startElem, Consumer<CommandElement> cb); String traverseElements(CommandElementLinked startElem, Type type, BiConsumer<CommandElement, StringBuilder> cb); void traverseElements(CommandElementLinked startElem, Type type, Consumer<CommandElement> cb); CommandElementLinked createRoot(Type type, String uri); String toUri(); String toRemoteUri(Type endWhenType, Action withAction, Behavior withBehavior); String[] getParameterValue(String requestParameter); String getFirstParameterValue(String requestParameter); boolean hasRawPayload(); String getRawPayload(); boolean containsFunction();  }
@Test public void testConstructor() { Command cmd = CommandBuilder.withUri("/anthem/fep/icr/p/umcase_view:100/pageCreateCaseInfo/_get").getCommand(); Command cloned = new Command(cmd); assertNotEquals(cmd, cloned); assertEquals(cmd.getAbsoluteUri(), cloned.getAbsoluteUri()); assertEquals(cmd.getAction(), cloned.getAction()); assertEquals(cmd.getEvent(), cloned.getEvent()); assertEquals(cmd.getBehaviors(), cloned.getBehaviors()); assertEquals(cmd.getClientUserId(), cloned.getClientUserId()); assertNotNull(cloned.getRoot()); }