PreparedEntry { public String[] getLevels() { return levels; } PreparedEntry(ParameterEntry parameterEntry);  PreparedEntry(String[] levels); String[] getLevels(); String getLevel(int k); @Override String toString();  }
@Test public void testSetLevels() { String[][] tests = { {"A", "B", "C"}, {"A", "B", null}, {"A", null, null}, {null, null, null}, {}, null }; String[][] expected = { {"A", "B", "C"}, {"A", "B"}, {"A"}, {}, {}, {} }; for (int i = 0; i < tests.length; i++) { String[] levels = tests[i]; String[] getlevels = expected[i]; PreparedEntry entry = new PreparedEntry(parameterEntry().withLevels(levels).build()); assertArrayEquals(getlevels, entry.getLevels()); } }