@Test public void testGoodValues() { assertEquals(AVAILABLE, validator.getFilterValue(NetworkFilter.STATUS, AVAILABLE)); assertEquals(IN_USE, validator.getFilterValue(NetworkFilter.STATUS, IN_USE)); assertEquals(ATTACHED, validator.getFilterValue(NetworkFilter.ATTACHMENT_STATUS, ATTACHED)); assertEquals(ATTACHING, validator.getFilterValue(NetworkFilter.ATTACHMENT_STATUS, ATTACHING)); assertEquals(DETACHED, validator.getFilterValue(NetworkFilter.ATTACHMENT_STATUS, DETACHED)); assertEquals(DETACHING, validator.getFilterValue(NetworkFilter.ATTACHMENT_STATUS, DETACHING)); }
@Override @NotNull public String getFilterValue(@NotNull final String filterName, @NotNull final String filterValue) { switch (filterName) { case ATTACHMENT_STATUS: { return NetworkInterfaceAttachmentStatus.getValue(filterValue); } case STATUS: { return NetworkInterfaceStatus.getValue(filterValue); } default: { return filterValue; } } }
NetworkFilterValidator implements FilterValidator { @Override @NotNull public String getFilterValue(@NotNull final String filterName, @NotNull final String filterValue) { switch (filterName) { case ATTACHMENT_STATUS: { return NetworkInterfaceAttachmentStatus.getValue(filterValue); } case STATUS: { return NetworkInterfaceStatus.getValue(filterValue); } default: { return filterValue; } } } }
NetworkFilterValidator implements FilterValidator { @Override @NotNull public String getFilterValue(@NotNull final String filterName, @NotNull final String filterValue) { switch (filterName) { case ATTACHMENT_STATUS: { return NetworkInterfaceAttachmentStatus.getValue(filterValue); } case STATUS: { return NetworkInterfaceStatus.getValue(filterValue); } default: { return filterValue; } } }  }
NetworkFilterValidator implements FilterValidator { @Override @NotNull public String getFilterValue(@NotNull final String filterName, @NotNull final String filterValue) { switch (filterName) { case ATTACHMENT_STATUS: { return NetworkInterfaceAttachmentStatus.getValue(filterValue); } case STATUS: { return NetworkInterfaceStatus.getValue(filterValue); } default: { return filterValue; } } }  @Override @NotNull String getFilterValue(@NotNull final String filterName, @NotNull final String filterValue); }
NetworkFilterValidator implements FilterValidator { @Override @NotNull public String getFilterValue(@NotNull final String filterName, @NotNull final String filterValue) { switch (filterName) { case ATTACHMENT_STATUS: { return NetworkInterfaceAttachmentStatus.getValue(filterValue); } case STATUS: { return NetworkInterfaceStatus.getValue(filterValue); } default: { return filterValue; } } }  @Override @NotNull String getFilterValue(@NotNull final String filterName, @NotNull final String filterValue);  }