@Test public void shouldUpdateDataSetName() { final DataSetMetadata metadata = new DataSetMetadata(); metadata.setId("ds-1234"); metadata.setName("My updated name"); final PersistentPreparation preparation = mock(PersistentPreparation.class); when(preparationRepository.list(eq(PersistentPreparation.class), eq(TqlBuilder.eq("dataSetId", "ds-1234")))) .thenReturn(Stream.of(preparation), Stream.of(preparation)); when(datasetClient.getDataSetMetadata(eq("ds-1234"))).thenReturn(metadata); preparationEventUtil.performUpdateEvent(metadata.getId()); verify(preparation, times(1)).setDataSetName(eq("My updated name")); }
public void performUpdateEvent(String datasetId) { LOGGER.info("Performing update event for dataset {}", datasetId); cleanTransformationCache(datasetId); cleanTransformationMetadataCache(datasetId); updatesFromDataSetMetadata(datasetId); }
PreparationEventUtil { public void performUpdateEvent(String datasetId) { LOGGER.info("Performing update event for dataset {}", datasetId); cleanTransformationCache(datasetId); cleanTransformationMetadataCache(datasetId); updatesFromDataSetMetadata(datasetId); } }
PreparationEventUtil { public void performUpdateEvent(String datasetId) { LOGGER.info("Performing update event for dataset {}", datasetId); cleanTransformationCache(datasetId); cleanTransformationMetadataCache(datasetId); updatesFromDataSetMetadata(datasetId); }  }
PreparationEventUtil { public void performUpdateEvent(String datasetId) { LOGGER.info("Performing update event for dataset {}", datasetId); cleanTransformationCache(datasetId); cleanTransformationMetadataCache(datasetId); updatesFromDataSetMetadata(datasetId); }  void performUpdateEvent(String datasetId); }
PreparationEventUtil { public void performUpdateEvent(String datasetId) { LOGGER.info("Performing update event for dataset {}", datasetId); cleanTransformationCache(datasetId); cleanTransformationMetadataCache(datasetId); updatesFromDataSetMetadata(datasetId); }  void performUpdateEvent(String datasetId);  }