@@ -0,0 +1,2777 @@
+package gov.va.med.srcalc.web.view;%0A%0Aimport static org.mockito.Mockito.*;%0Aimport gov.va.med.srcalc.domain.SampleObjects;%0A%0Aimport javax.servlet.jsp.tagext.JspFragment;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Apublic class VariableSpecificTagTest%0A%7B%0A    // A set of mock JspFragments to verify behavior.%0A    private JspFragment numericalFragment;%0A    private JspFragment booleanFragment;%0A    private JspFragment multiSelectFragment;%0A    private JspFragment procedureFragment;%0A    private VariableSpecificTag tag;%0A    %0A    @Before%0A    public void setup()%0A    %7B%0A        // Create the tag with a bunch of mock fragments.%0A        tag = new VariableSpecificTag();%0A        numericalFragment = mock(JspFragment.class);%0A        tag.setNumericalFragment(numericalFragment);%0A        booleanFragment = mock(JspFragment.class);%0A        tag.setBooleanFragment(booleanFragment);%0A        multiSelectFragment = mock(JspFragment.class);%0A        tag.setMultiSelectFragment(multiSelectFragment);%0A        procedureFragment = mock(JspFragment.class);%0A        tag.setProcedureFragment(procedureFragment);%0A    %7D%0A%0A    @Test%0A    public final void testDoTagNumerical() throws Exception%0A    %7B%0A        // Behavior verification.%0A        tag.setVariable(SampleObjects.sampleAgeVariable());%0A        tag.doTag();%0A        verify(numericalFragment).invoke(null);%0A        verify(booleanFragment, never()).invoke(null);%0A        verify(multiSelectFragment, never()).invoke(null);%0A        verify(procedureFragment, never()).invoke(null);%0A    %7D%0A%0A    @Test%0A    public final void testDoTagBoolean() throws Exception%0A    %7B%0A        // Behavior verification.%0A        tag.setVariable(SampleObjects.dnrVariable());%0A        tag.doTag();%0A        verify(numericalFragment, never()).invoke(null);%0A        verify(booleanFragment).invoke(null);%0A        verify(multiSelectFragment, never()).invoke(null);%0A        verify(procedureFragment, never()).invoke(null);%0A    %7D%0A%0A    @Test%0A    public final void testDoTagMultiSelect() throws Exception%0A    %7B%0A        // Behavior verification.%0A        tag.setVariable(SampleObjects.functionalStatusVariable());%0A        tag.doTag();%0A        verify(numericalFragment, never()).invoke(null);%0A        verify(booleanFragment, never()).invoke(null);%0A        verify(multiSelectFragment).invoke(null);%0A        verify(procedureFragment, never()).invoke(null);%0A    %7D%0A%0A    @Test%0A    public final void testDoTagProcedure() throws Exception%0A    %7B%0A        // Behavior verification.%0A        tag.setVariable(SampleObjects.sampleProcedureVariable());%0A        tag.doTag();%0A        verify(numericalFragment, never()).invoke(null);%0A        verify(booleanFragment, never()).invoke(null);%0A        verify(multiSelectFragment, never()).invoke(null);%0A        verify(procedureFragment).invoke(null);%0A    %7D%0A    %0A%7D%0A

Test VariableSpecificTagTest.