VariableHelper { static long[] getLongVector(int length, long fillValue) { final long[] vector = new long[length]; if (fillValue != 0L) { Arrays.fill(vector, fillValue); } return vector; }    }
@Test public void testGetFilledVector_longs_filled() { final long[] longVector = VariableHelper.getLongVector(19, -118837676435L); assertEquals(19, longVector.length); for (final long value : longVector) { assertEquals(-118837676435L, value); } }
@Test public void testGetFilledVector_longs_unfilled() { final long[] longVector = VariableHelper.getLongVector(20, 0L); assertEquals(20, longVector.length); for (final long value : longVector) { assertEquals(0L, value); } }