### Question:
AvailabilityChecker { protected boolean isAvailable(Stack stack, Versioned supportedAfter) { if (StringUtils.isNotBlank(stack.getAppVersion())) { Versioned currentVersion = stack::getAppVersion; return new VersionComparator().compare(currentVersion, supportedAfter) > 0; } else { return false; } }    }### Answer:
@Test public void testAvailable() { Stack stack = new Stack(); stack.setAppVersion("2.20.0-rc.1"); assertTrue(underTest.isAvailable(stack, afterVersion1)); stack.setAppVersion("2.21.0-rc.1"); assertTrue(underTest.isAvailable(stack, afterVersion1)); stack.setAppVersion("2.20.0"); assertTrue(underTest.isAvailable(stack, afterVersion1)); stack.setAppVersion("2.20.0-dev.2"); assertTrue(underTest.isAvailable(stack, afterVersion1)); }
@Test public void testUnavailable() { Stack stack = new Stack(); stack.setAppVersion("2.19.0"); assertFalse(underTest.isAvailable(stack, afterVersion1)); stack.setAppVersion("2.19.0-rc.23"); assertFalse(underTest.isAvailable(stack, afterVersion1)); stack.setAppVersion("2.19.0-rc.122"); assertFalse(underTest.isAvailable(stack, afterVersion1)); stack.setAppVersion("2.19.0-dev.23"); assertFalse(underTest.isAvailable(stack, afterVersion1)); stack.setAppVersion("2.18.0"); assertFalse(underTest.isAvailable(stack, afterVersion1)); stack.setAppVersion("2.18.0-rc.2"); assertFalse(underTest.isAvailable(stack, afterVersion1)); }
@Test public void testAppVersionIsBlank() { Stack stack = new Stack(); assertFalse(underTest.isAvailable(stack, afterVersion1)); stack.setAppVersion(""); assertFalse(underTest.isAvailable(stack, afterVersion1)); stack.setAppVersion(" "); assertFalse(underTest.isAvailable(stack, afterVersion1)); }