LabeledMTJMatrix implements LabeledMatrix<Matrix, L> { public static <L extends Serializable> LabeledMTJMatrix<L> of(Matrix M, List<L> labels) { return new LabeledMTJMatrix<>(M, labels); } LabeledMTJMatrix(Matrix M, List<L> labels); @Override Matrix getMatrix(); @Override List<L> getLabels(); static LabeledMTJMatrix<L> of(Matrix M, List<L> labels);  }
@Test(expected = IllegalArgumentException.class) public void testCreation_withIncorrectSizes() { labels.remove(0); LabeledDenseMatrix.of(M, labels); }