RandomProblem004 { public static int sumOfNNumbers(int n) { int sum = 0; for (int i = 1; i <= n; i++) { sum += i; } return sum; }  static int sumOfNNumbers(int n); static int squareOfANumber(int n); static int sumOfNNumbers1(int n);  }
@Test public void sumOfFirst10NumbersIs55() throws Exception { int sumOfNNumbers = RandomProblem004.sumOfNNumbers(10); assertThat(sumOfNNumbers, equalTo(55)); }