### Question:
CoreProfile { @Deprecated public static CoreProfile loadFrom(Properties properties, ClassLoader loader) { if (properties == null) { throw new IllegalArgumentException("properties must not be null"); } if (loader == null) { throw new IllegalArgumentException("loader must not be null"); } return loadFrom(properties, ProfileContext.system(loader)); } CoreProfile(int maxProcesses); int getMaxProcesses(); @Deprecated static CoreProfile loadFrom(Properties properties, ClassLoader loader); static CoreProfile loadFrom(Properties properties, ProfileContext context); void storeTo(Properties properties); static void removeCorrespondingKeys(Properties properties); static final String KEY_PREFIX; @Deprecated
    static final String KEY_MAX_THREADS; static final String KEY_MAX_PROCESSES; static final int DEFAULT_MAX_PROCESSES; }### Answer:
@Test public void loadFrom() { Properties p = new Properties(); CoreProfile profile = CoreProfile.loadFrom(p, ProfileContext.system(getClass().getClassLoader())); assertThat(profile.getMaxProcesses(), is(CoreProfile.DEFAULT_MAX_PROCESSES)); }
@Test(expected = IllegalArgumentException.class) public void loadFrom_invalid_maxThreads() { Properties p = new Properties(); p.setProperty(CoreProfile.KEY_PREFIX + CoreProfile.KEY_MAX_PROCESSES, "0"); CoreProfile.loadFrom(p, ProfileContext.system(getClass().getClassLoader())); }
@Test(expected = IllegalArgumentException.class) public void loadFrom_invalid_token() { Properties p = new Properties(); p.setProperty(CoreProfile.KEY_PREFIX + CoreProfile.KEY_MAX_PROCESSES, "INVALID"); CoreProfile.loadFrom(p, ProfileContext.system(getClass().getClassLoader())); }