MatrixAlgebraFactory { public static MatrixAlgebra getMatrixAlgebra(final String algebraName) { if (s_staticInstances.containsKey(algebraName)) { return s_staticInstances.get(algebraName); } throw new IllegalArgumentException("Matrix algebra " + algebraName + " not found"); } private  MatrixAlgebraFactory(); static MatrixAlgebra getMatrixAlgebra(final String algebraName); static String getMatrixAlgebraName(final MatrixAlgebra algebra); static final String COLT; static final String COMMONS; static final String OG; static final ColtMatrixAlgebra COLT_ALGEBRA; static final CommonsMatrixAlgebra COMMONS_ALGEBRA; static final OGMatrixAlgebra OG_ALGEBRA; }
@Test(expectedExceptions = IllegalArgumentException.class) public void testBadName() { MatrixAlgebraFactory.getMatrixAlgebra("X"); }