DecompositionFactory { public static Decomposition<?> getDecomposition(final String decompositionName) { final Decomposition<?> decomposition = s_staticInstances.get(decompositionName); if (decomposition != null) { return decomposition; } throw new IllegalArgumentException("Could not get decomposition " + decompositionName); } private  DecompositionFactory(); static Decomposition<?> getDecomposition(final String decompositionName); static String getDecompositionName(final Decomposition<?> decomposition); static final String LU_COMMONS_NAME; static final String QR_COMMONS_NAME; static final String SV_COLT_NAME; static final String SV_COMMONS_NAME; static final Decomposition<?> LU_COMMONS; static final Decomposition<?> QR_COMMONS; static final Decomposition<?> SV_COLT; static final Decomposition<?> SV_COMMONS; }
@Test(expectedExceptions = IllegalArgumentException.class) public void testBadName() { DecompositionFactory.getDecomposition("X"); }