The title of the challenge specifically says that we should find Two numbers that add up to number n.
the First test case expects an array with more than two elements as you can see.
I think this is a mistake and it should be fixed
Course: https://www.educative.io/courses/data-structures-in-java
Lesson: Educative: Interactive Courses for Software Developers