### Question:
ColumnVector { public ColumnVector multiplyElementWise(final ColumnVector vector) { return this.transform(() -> ColumnVector.this.matrix.multiplyElementWise(vector.matrix)); } 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 vectorCanBeMultipliedByVectorElementWise() { final ColumnVector v1 = new ColumnVector(3, 7, 2); final ColumnVector v2 = new ColumnVector(1, 5, 3); final ColumnVector result = v1.multiplyElementWise(v2); MatcherAssert.assertThat(result, IsNot.not(IsEqual.equalTo(v1))); MatcherAssert.assertThat(result, IsNot.not(IsEqual.equalTo(v2))); MatcherAssert.assertThat(result, IsEqual.equalTo(new ColumnVector(3, 35, 6))); }
@Test public void vectorCannotBeMultipliedByVectorWithFewerColumns() { final ColumnVector v1 = new ColumnVector(2); final ColumnVector v2 = new ColumnVector(3); Assertions.assertThrows(IllegalArgumentException.class, () -> v1.multiplyElementWise(v2)); }
@Test public void vectorCannotBeMultipliedByVectorWithMoreColumns() { final ColumnVector v1 = new ColumnVector(3); final ColumnVector v2 = new ColumnVector(2); Assertions.assertThrows(IllegalArgumentException.class, () -> v1.multiplyElementWise(v2)); }