I have a Map which takes in an a String key, and an array of custom objects as the value. the map usually contains two entries, and the arrays for both entries never change in terms of data; once they are populated(one, for example, is an array of 50 state objects) they do not change. I have been following the practice that all tests should be self contained, i.e. each test class should have its own data for testing to reduce dependencies and such, but i have repeated the initialisation and population of these arrays across two different test classes already, with the potential to have to do it again for another couple of test classes.
Can it be considered best practice to have this array creation moved to a separate utility class solely for testing?