### Question:
MatrixAlgebraFactory { public static MatrixAlgebra getMatrixAlgebra(String algebraName) { if (STATIC_INSTANCES.containsKey(algebraName)) { return STATIC_INSTANCES.get(algebraName); } throw new IllegalArgumentException("Matrix algebra " + algebraName + " not found"); } 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 testBadName() { assertThatIllegalArgumentException() .isThrownBy(() -> MatrixAlgebraFactory.getMatrixAlgebra("X")); }