### Question:
MatrixAlgebraFactory { public static String getMatrixAlgebraName(MatrixAlgebra algebra) { if (algebra == null) { return null; } return INSTANCE_NAMES.get(algebra.getClass()); } private  MatrixAlgebraFactory(); static MatrixAlgebra getMatrixAlgebra(String algebraName); static String getMatrixAlgebraName(MatrixAlgebra algebra); static final String COMMONS; static final String OG; static final CommonsMatrixAlgebra COMMONS_ALGEBRA; static final OGMatrixAlgebra OG_ALGEBRA; }### Answer:
@Test public void testBadClass() { assertThat(MatrixAlgebraFactory.getMatrixAlgebraName(new MatrixAlgebra() { @Override public double getCondition(Matrix m) { return 0; } @Override public double getDeterminant(Matrix m) { return 0; } @Override public double getInnerProduct(Matrix m1, Matrix m2) { return 0; } @Override public DoubleMatrix getInverse(Matrix m) { return null; } @Override public double getNorm1(Matrix m) { return 0; } @Override public double getNorm2(Matrix m) { return 0; } @Override public double getNormInfinity(Matrix m) { return 0; } @Override public DoubleMatrix getOuterProduct(Matrix m1, Matrix m2) { return null; } @Override public DoubleMatrix getPower(Matrix m, int p) { return null; } @Override public DoubleMatrix getPower(Matrix m, double p) { return null; } @Override public double getTrace(Matrix m) { return 0; } @Override public DoubleMatrix getTranspose(Matrix m) { return null; } @Override public Matrix multiply(Matrix m1, Matrix m2) { return null; } })).isNull(); }