PreparedEntry { public String getLevel(int k) { return (k >= 0 && k < levels.length) ? levels[k] : null; } PreparedEntry(ParameterEntry parameterEntry);  PreparedEntry(String[] levels); String[] getLevels(); String getLevel(int k); @Override String toString();  }
@Test public void testGetLevel() { PreparedEntry entry = new PreparedEntry(parameterEntry().withLevels("A", "B").build()); assertEquals("A", entry.getLevel(0)); assertEquals("B", entry.getLevel(1)); assertEquals(null, entry.getLevel(2)); }