dependency-check-utils/src/test/java/org/owasp/dependencycheck/utils/SettingsTest.java
/**
     * Assert {@link Settings#getArray(String)} from a delimited string returns
     * multiple values in an array.
     */
Assert  Settings#getArray(String) from a delimited string returns
multiple values in an array.
Assert Settings#getArray ( String ) from a delimited string returns multiple values in an array .
@Test
    public void testGetArrayFromADelimitedString() {
        final String delimitedString = "value1,value2";
        Settings.setString("key", delimitedString);
        final String[] array = Settings.getArray("key");
        assertThat("Expected the array to be non-null", array, notNullValue());
        assertThat("Expected the array to have two values", array.length, is(2));
        assertThat("Expected the first array value to be value1", array[0], is("value1"));
        assertThat("Expected the second array value to be value2", array[1], is("value2"));
    }
@ Test public void testGetArrayFromADelimitedString ( ) { final String delimitedString = "value1,value2" ; Settings . setString ( "key" , delimitedString ) ; final String [ ] array = Settings . getArray ( "key" ) ; assertThat ( "Expected the array to be non-null" , array , notNullValue ( ) ) ; assertThat ( "Expected the array to have two values" , array . length , is ( 2 ) ) ; assertThat ( "Expected the first array value to be value1" , array [ 0 ] , is ( "value1" ) ) ; assertThat ( "Expected the second array value to be value2" , array [ 1 ] , is ( "value2" ) ) ; }
Assert {@link Settings#getArray(String)} from a delimited string returns
 multiple values in an array.
Assert { @link Settings#getArray ( String ) } from a delimited string returns multiple values in an array .
// GIVEN a delimited string // WHEN getting the array // THEN the split array is returned