### Question:
ShingleBuilder { public double[] getShingle() { double[] shingle = new double[shingleSize * dimensions]; getShingle(shingle); return shingle; } ShingleBuilder(int dimensions, int shingleSize, boolean cyclic);  ShingleBuilder(int dimensions, int shingleSize); boolean isFull(); int getInputPointSize(); int getShingledPointSize(); boolean isCyclic(); int getShingleIndex(); void addPoint(double[] point); double[] getShingle(); void getShingle(double[] shingle);  }### Answer:
@Test public void testGetShingleWithInvalidArguments() { assertThrows(NullPointerException.class, () -> builder.getShingle(null)); double[] buffer = new double[2]; assertThrows(IllegalArgumentException.class, () -> builder.getShingle(buffer)); }