@@ -0,0 +1,2621 @@
+/*%0A * Copyright 2017 ImpactDevelopment%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Aimport clientapi.util.annotation.Label;%0Aimport clientapi.value.IValue;%0Aimport clientapi.value.annotation.BooleanValue;%0Aimport clientapi.value.annotation.NumberValue;%0Aimport clientapi.value.holder.ValueHolder;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertNotNull;%0A%0A/**%0A * @author Brady%0A * @since 9/11/2017 11:24 AM%0A */%0Apublic class ValueTest %7B%0A%0A    @Test%0A    public void test() %7B%0A        TestHolder holder = new TestHolder();%0A%0A        assertEquals(%22Test ValueHolder should have exactly 1 value%22, holder.getValues().size(), 1);%0A%0A        IValue boolean_value;%0A        assertNotNull(%22IValue with a valid id should evaluate to non null%22, (boolean_value = holder.getValue(%22boolean_value%22)));%0A        assertEquals(%22BooleanValue should resolve to false if undefined%22, boolean_value.getValue(), false);%0A        assertEquals(%22Test BooleanValue should have exactly 1 child value%22, boolean_value.getValues().size(), 1);%0A%0A        IValue child_value;%0A        assertNotNull(%22Child value shouldn't be null%22, (child_value = boolean_value.getValues().get(0)));%0A        assertNotNull(%22Child value should have a non-null parent%22, child_value.getParent());%0A        assertEquals(%22Child value's parent id should match the Test BooleanValue id%22, child_value.getParent(), boolean_value.getId());%0A        assertEquals(%22Child value shouldn't have any children%22, child_value.getValues().size(), 0);%0A        assertEquals(%22Child value's value should be equal to its field value%22, child_value.getValue(), 5);%0A    %7D%0A%0A    private class TestHolder extends ValueHolder %7B%0A%0A        //@formatter:off%0A%0A        @Label(name = %22Boolean Value%22, id = %22boolean_value%22, description = %22An example boolean value%22)%0A        @BooleanValue%0A        private boolean bool;%0A%0A            @Label(name = %22Child Value%22, parent = %22boolean_value%22, id = %22child_value%22, description = %22An example child value%22)%0A            @NumberValue(min = 0, max = 10)%0A            private int child = 5;%0A%0A        //@formatter:on%0A    %7D%0A%7D%0A

Add basic ValueTest