### Question:
CommonsMathWrapper { public static RealMatrix wrapAsMatrix(DoubleArray x) { ArgChecker.notNull(x, "x"); int n = x.size(); double[][] y = new double[n][1]; for (int i = 0; i < n; i++) { y[i][0] = x.get(i); } return new Array2DRowRealMatrix(x.toArrayUnsafe()); } private  CommonsMathWrapper(); static UnivariateFunction wrapUnivariate(Function<Double, Double> f); static RealMatrix wrap(DoubleMatrix x); static RealMatrix wrapAsMatrix(DoubleArray x); static DoubleMatrix unwrap(RealMatrix x); static RealVector wrap(DoubleArray x); static DoubleArray unwrap(RealVector x);  }### Answer:
@Test public void testVectorAsMatrix() { RealMatrix commons = CommonsMathWrapper.wrapAsMatrix(OG_VECTOR); double[][] data = commons.getData(); assertThat(data.length).isEqualTo(OG_VECTOR.size()); assertThat(data[0].length).isEqualTo(1); }