### Question:
AlgorithmLevelImpl extends QuestionAnswerLevelImpl implements Algorithm { @Override public List<String> getQuestions() { return questions; } AlgorithmLevelImpl(String... input); @Override List<String> getQuestions(); String get(String input); String get(int input); String get(int... input); String get(String... input); static final int MAX_QUESTION_FOR_ONE_INT_ARGUMENT; }### Answer:
@Test public void shouldConstruct_inputIsEmpty_noOverride() { TestAlgorithm algorithm = new TestAlgorithm(); assertEquals("[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, " + "11, 12, 13, 14, 15, 16, 17, 18, 19, " + "20, 21, 22, 23, 24, 25]", algorithm.getQuestions().toString()); }
@Test public void shouldConstruct_inputIsEmpty_withOverride() { TestAlgorithm algorithm = new TestAlgorithm() { @Override public List<String> getQuestions() { return Arrays.asList("1", "2"); } }; assertEquals("[1, 2]", algorithm.getQuestions().toString()); }
@Test public void shouldConstruct_inputIsNotEmpty_withOverride() { TestAlgorithm algorithm = new TestAlgorithm("1", "2", "3", "4") { @Override public List<String> getQuestions() { return Arrays.asList("5", "6"); } }; assertEquals("[5, 6]", algorithm.getQuestions().toString()); }
@Test public void shouldConstruct_inputIsNotEmpty_noOverride() { TestAlgorithm algorithm = new TestAlgorithm("1", "2", "3", "4"); assertEquals("[1, 2, 3, 4]", algorithm.getQuestions().toString()); }