@Test
    public void alwaysHasAnEntry() {
        final CallCounter cc = new CallCounter();
        final TextSpinner<Integer> ts = new TextSpinner<Integer>().setChangeListener(cc::callWith);

        //freshly initialized Spinner already has a dummy value
        assertThat(ts.get()).isNull();
        assertThat(ts.getValues()).isEqualTo(Arrays.asList(new Integer[]{null}));
        assertThat(cc.getCnt()).isEqualTo(0);
        cc.reset();

        //setting a real list REMOVES the dummy value
        ts.setValues(Arrays.asList(1, 2, 3));
        assertThat(ts.get()).isEqualTo(1); //is set to the FIRST value
        assertThat(ts.getValues()).isEqualTo(Arrays.asList(1, 2, 3));
        assertThat(cc.getCnt()).isEqualTo(1);
        assertThat(cc.getLastValue()).isEqualTo(1);
        cc.reset();

        //setting an empty list restores dummy value
        ts.setValues(Collections.emptyList());
        assertThat(ts.get()).isNull();
        assertThat(ts.getValues()).isEqualTo(Arrays.asList(new Integer[]{null}));
        assertThat(cc.getCnt()).isEqualTo(1);
        assertThat(cc.getLastValue()).isEqualTo(null);
        cc.reset();
    }
This can, of course, only test the non-ui-parts of the {@link TextSpinner}
main/src/test/java/cgeo/geocaching/ui/TextSpinnerTest.java