Testing behavior for methods such as this one can be difficult. This test does not ensure that getStatisticIndex arbitrarily returns int 0 every time! (as may be the case for someone who wrote a method but has not implemented it yet and simply has stubbed it to return the value 0 every time).

To get a slightly better test of code behavior you can make this into two methods: testGetStatisticIndex_oneStat() and testGetStatisticIndex_twoStats() where in the second method you add two statistics and assert that the second statistic's index is 1.