### Question:
LocalFileCredentialFactory implements CredentialFactory { public static LocalFileCredentialFactory fromConfiguration() { checkState(Configuration.isInitialized(), "configuration not initialized"); ConfigValue<String> serviceAccountKeyFilePath = Configuration.getString(LocalFileCredentialFactory.SERVICE_ACCOUNT_KEY_FILE_CONFIG, null); ConfigValue<String> serviceAccountId = Configuration.getString(LocalFileCredentialFactory.SERVICE_ACCOUNT_ID_CONFIG, ""); return new Builder() .setServiceAccountKeyFilePath(serviceAccountKeyFilePath.get()) .setServiceAccountId(serviceAccountId.get()) .setProxy(GoogleProxy.fromConfiguration()) .build(); } private  LocalFileCredentialFactory(Builder builder); static LocalFileCredentialFactory fromConfiguration(); @Override GoogleCredential getCredential(Collection<String> scopes); static final String SERVICE_ACCOUNT_ID_CONFIG; static final String SERVICE_ACCOUNT_KEY_FILE_CONFIG; }### Answer:
@Test public void testfromConfigurationNotInitialized() throws Exception { thrown.expect(IllegalStateException.class); thrown.expectMessage(containsString("configuration not initialized")); LocalFileCredentialFactory.fromConfiguration(); }