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