### Question:
ColumnVector { public void removeNegatives() { this.matrix.removeNegatives(); } ColumnVector(final int size);  ColumnVector(final double... vector); private  ColumnVector(final Matrix matrix); int size(); double getAt(final int index); void setAt(final int index, final double val); void incrementAt(final int index, final double val); void normalize(); void scale(final double scale); ColumnVector multiplyElementWise(final ColumnVector vector); ColumnVector addElementWise(final ColumnVector vector); double absSum(); double sum(); ColumnVector roundTo(final int numPlaces); ColumnVector add(final double scalar); ColumnVector multiply(final double scalar); ColumnVector sqrt(); ColumnVector abs(); final boolean isZeroVector(); double[] getRaw(); void setAll(final double val); boolean align(); double max(); double median(); double getMagnitude(); double l1Distance(final ColumnVector vector); double l2Distance(final ColumnVector vector); double correlation(final ColumnVector vector); @Override String toString(); void removeNegatives(); @Override int hashCode(); @Override boolean equals(final Object obj);  }### Answer:
@Test public void removeNegativesSetsNegativeValuesToZero() { final Map<ColumnVector, ColumnVector> testCases = new HashMap<ColumnVector, ColumnVector>() { { this.put(new ColumnVector(2, -4, 1), new ColumnVector(2, 0, 1)); this.put(new ColumnVector(-1, 454, 1), new ColumnVector(0, 454, 1)); this.put(new ColumnVector(2, 343, -131), new ColumnVector(2, 343, 0)); this.put(new ColumnVector(-2, -343, -131), new ColumnVector(0, 0, 0)); this.put(new ColumnVector(2, 343, 131), new ColumnVector(2, 343, 131)); } }; for (final Map.Entry<ColumnVector, ColumnVector> entry : testCases.entrySet()) { entry.getKey().removeNegatives(); MatcherAssert.assertThat(entry.getKey(), IsEqual.equalTo(entry.getValue())); } }