AmazonConfigurationLoader { public String getSecretKey() { return checkNotNull(configuration.getString(SECRET_KEY, null), "No AWS secret key configured.").trim(); } AmazonConfigurationLoader(Configuration configuration); String getAccessKeyId(); String getSecretKey(); String getNodeJvmOptions(); LogLevel getNodeLogLevel(); Boolean getNodeRemoteLogging(); Integer getNodeRemoteLoggingPort(); Set<Credentials> getConfiguredCredentials(); Map<String, AWSInstanceProfile> getConfiguredProfiles(); static final String ACCESS_KEY_ID; static final String SECRET_KEY; static final String KEYPAIRS; static final String PROFILES; static final String PRIVATE_KEY; static final String PUBLIC_KEY; static final String USER; static final String AMI_ID; static final String REGION; static final String ZONE; static final String TYPE; static final String KEYPAIR; static final String SHUTDOWN_STATE; static final String GROUP; static final String SPOT_PRICE; static final String SPOT_REQUEST_TYPE; static final String SPOT_REQUEST_VALID_FROM; static final String SPOT_REQUEST_VALID_TO; static final String PLACEMENT_GROUP; static final String NODE_JVM_OPTIONS; static final String NODE_LOG_LEVEL; static final String NODE_LOG_REMOTE; static final String NODE_LOG_REMOTE_PORT; }
@Test public void testGetSecretKey() throws ConfigurationException { goodConfigSetup(); assertThat(configLoader.getSecretKey(), is(equalTo(SECRET_KEY))); }
@Test(expected=NullPointerException.class) public void testGetBadSecretKey() throws ConfigurationException { badConfigSetup(); configLoader.getSecretKey(); }