@Test public void shouldNotAddLookupIfItWasPreviouslyAdded() throws Exception { when(bundle.getResource(MDS_LOOKUPS_JSON)).thenReturn(VALID_JSON); when(jsonLookupService.exists(CLASS_NAME, ORIGIN_LOOKUP_NAME)).thenReturn(true); editableLookupsLoader.addEditableLookups(output, bundle); verify(jsonLookupService, times(1)).exists(matches(CLASS_NAME), matches(ORIGIN_LOOKUP_NAME)); verify(jsonLookupService, times(0)).createJsonLookup(any(JsonLookupDto.class)); assertEquals(0, output.getLookupProcessorOutputs().size()); }
public void addEditableLookups(MDSProcessorOutput output, Bundle bundle) { List<EntityLookups> entitiesLookups = loadEntitiesLookups(bundle); addEditableEntitiesLookups(output, bundle, entitiesLookups); }
EditableLookupsLoader { public void addEditableLookups(MDSProcessorOutput output, Bundle bundle) { List<EntityLookups> entitiesLookups = loadEntitiesLookups(bundle); addEditableEntitiesLookups(output, bundle, entitiesLookups); } }
EditableLookupsLoader { public void addEditableLookups(MDSProcessorOutput output, Bundle bundle) { List<EntityLookups> entitiesLookups = loadEntitiesLookups(bundle); addEditableEntitiesLookups(output, bundle, entitiesLookups); } @Autowired  EditableLookupsLoader(JsonLookupService jsonLookupService); }
EditableLookupsLoader { public void addEditableLookups(MDSProcessorOutput output, Bundle bundle) { List<EntityLookups> entitiesLookups = loadEntitiesLookups(bundle); addEditableEntitiesLookups(output, bundle, entitiesLookups); } @Autowired  EditableLookupsLoader(JsonLookupService jsonLookupService); void addEditableLookups(MDSProcessorOutput output, Bundle bundle); }
EditableLookupsLoader { public void addEditableLookups(MDSProcessorOutput output, Bundle bundle) { List<EntityLookups> entitiesLookups = loadEntitiesLookups(bundle); addEditableEntitiesLookups(output, bundle, entitiesLookups); } @Autowired  EditableLookupsLoader(JsonLookupService jsonLookupService); void addEditableLookups(MDSProcessorOutput output, Bundle bundle);  }