@Test public void shouldListOnlyExternalFormats() { final Stream<ExportFormat> externalFormats = service.getExternalFormats(); externalFormats.forEach(format -> Assert.assertFalse(StringUtils.equals(JsonFormat.JSON, format.getName()))); }
public Stream<ExportFormat> getExternalFormats() { return types.stream().filter(format -> !INTERNAL_TYPES.contains(format.getName())); }
FormatRegistrationService { public Stream<ExportFormat> getExternalFormats() { return types.stream().filter(format -> !INTERNAL_TYPES.contains(format.getName())); } }
FormatRegistrationService { public Stream<ExportFormat> getExternalFormats() { return types.stream().filter(format -> !INTERNAL_TYPES.contains(format.getName())); } FormatRegistrationService(List<ExportFormat> types); }
FormatRegistrationService { public Stream<ExportFormat> getExternalFormats() { return types.stream().filter(format -> !INTERNAL_TYPES.contains(format.getName())); } FormatRegistrationService(List<ExportFormat> types); Stream<ExportFormat> getExternalFormats(); ExportFormat getByName(String formatName); }
FormatRegistrationService { public Stream<ExportFormat> getExternalFormats() { return types.stream().filter(format -> !INTERNAL_TYPES.contains(format.getName())); } FormatRegistrationService(List<ExportFormat> types); Stream<ExportFormat> getExternalFormats(); ExportFormat getByName(String formatName);  }