@Test(expectedExceptions=IllegalStateException.class) public void testInvalidKeyData() throws Exception { ConfigBag config = ConfigBag.newInstance(); config.put(LocationConfigKeys.PRIVATE_KEY_DATA, "mydata"); LocationConfigUtils.OsCredential creds = LocationConfigUtils.getOsCredential(config).doKeyValidation(false); Assert.assertTrue(creds.hasKey()); Assert.assertFalse(creds.getWarningMessages().isEmpty()); creds.checkNoErrors(); }
public static OsCredential getOsCredential(ConfigBag config) { return OsCredential.newInstance(config); }
LocationConfigUtils { public static OsCredential getOsCredential(ConfigBag config) { return OsCredential.newInstance(config); } }
LocationConfigUtils { public static OsCredential getOsCredential(ConfigBag config) { return OsCredential.newInstance(config); }  }
LocationConfigUtils { public static OsCredential getOsCredential(ConfigBag config) { return OsCredential.newInstance(config); }  static OsCredential getOsCredential(ConfigBag config); @Deprecated static String getPrivateKeyData(ConfigBag config); @Deprecated static String getPublicKeyData(ConfigBag config); @Deprecated static String getKeyData(ConfigBag config, ConfigKey<String> dataKey, ConfigKey<String> fileKey); @Deprecated @SuppressWarnings("unchecked") static T getConfigCheckingDeprecatedAlternatives(ConfigBag configBag, ConfigKey<T> preferredKey,
            ConfigKey<?> ...deprecatedKeys); static Map<ConfigKey<String>,String> finalAndOriginalSpecs(String finalSpec, Object ...sourcesForOriginalSpec); static boolean isEnabled(ManagementContext mgmt, String prefix); }
LocationConfigUtils { public static OsCredential getOsCredential(ConfigBag config) { return OsCredential.newInstance(config); }  static OsCredential getOsCredential(ConfigBag config); @Deprecated static String getPrivateKeyData(ConfigBag config); @Deprecated static String getPublicKeyData(ConfigBag config); @Deprecated static String getKeyData(ConfigBag config, ConfigKey<String> dataKey, ConfigKey<String> fileKey); @Deprecated @SuppressWarnings("unchecked") static T getConfigCheckingDeprecatedAlternatives(ConfigBag configBag, ConfigKey<T> preferredKey,
            ConfigKey<?> ...deprecatedKeys); static Map<ConfigKey<String>,String> finalAndOriginalSpecs(String finalSpec, Object ...sourcesForOriginalSpec); static boolean isEnabled(ManagementContext mgmt, String prefix);  }