CommandExecution { public static Map<String, String> getExecutionVariables(Map<String, String> variables, CommandExecution commandExecution) { Objects.requireNonNull(variables); Objects.requireNonNull(commandExecution); if (commandExecution.getOverloadedVariables() != null) { return ImmutableMap.<String, String>builder() .putAll(variables) .putAll(commandExecution.getOverloadedVariables()) .build(); } return variables; } CommandExecution(Command command, int executionCount);  CommandExecution(Command command, int executionCount, int priority);  CommandExecution(Command command, int executionCount, int priority, Map<String, String> tags);  CommandExecution(Command command, int executionCount, int priority, Map<String, String> tags, Map<String, String> overloadedVariables); static Map<String, String> getExecutionVariables(Map<String, String> variables, CommandExecution commandExecution); Command getCommand(); int getExecutionCount(); int getPriority(); Map<String, String> getTags(); Map<String, String> getOverloadedVariables();  }
@Test public void getExecutionVariablesTest1() { try { CommandExecution.getExecutionVariables(null, new CommandExecution(command, 1, 0, null, null)); fail(); } catch (NullPointerException ignored) { } }
@Test public void getExecutionVariablesTest2() { Map<String, String> executionVariables = CommandExecution.getExecutionVariables(ImmutableMap.of("a", "1", "b", "2"), new CommandExecution(command, 1, 0, null, null)); assertEquals(ImmutableMap.of("a", "1", "b", "2"), executionVariables); }
@Test public void getExecutionVariablesTest3() { Map<String, String> executionVariables = CommandExecution.getExecutionVariables(ImmutableMap.of("a", "1", "b", "2"), new CommandExecution(command, 1, 0, null, ImmutableMap.of("c", "3"))); assertEquals(ImmutableMap.of("a", "1", "b", "2", "c", "3"), executionVariables); }