@Test public void jobConfigurationNotFound() { final JobInstance configuration = newJobConfiguration(); assertNull(cut.activeJobConfigurations.get(configuration.getId())); when(repository.findOne(configuration.getId())).thenReturn(null); assertNull(cut.getJobInstance(configuration.getId())); }
public JobInstance getJobInstance(final Integer id) { JobInstance instance = activeJobConfigurations.get(id); if (instance == null) { instance = jobInstanceRepository.findOne(id); if (instance != null) { adjustPrefixes(instance); activeJobConfigurations.put(id, instance); } } return instance; }
Cache { public JobInstance getJobInstance(final Integer id) { JobInstance instance = activeJobConfigurations.get(id); if (instance == null) { instance = jobInstanceRepository.findOne(id); if (instance != null) { adjustPrefixes(instance); activeJobConfigurations.put(id, instance); } } return instance; } }
Cache { public JobInstance getJobInstance(final Integer id) { JobInstance instance = activeJobConfigurations.get(id); if (instance == null) { instance = jobInstanceRepository.findOne(id); if (instance != null) { adjustPrefixes(instance); activeJobConfigurations.put(id, instance); } } return instance; }  }
Cache { public JobInstance getJobInstance(final Integer id) { JobInstance instance = activeJobConfigurations.get(id); if (instance == null) { instance = jobInstanceRepository.findOne(id); if (instance != null) { adjustPrefixes(instance); activeJobConfigurations.put(id, instance); } } return instance; }  String getAliadaClassFrom(final String crmClass); Pattern getStartPattern(final String regex); Pattern getEndPattern(final String regex); String getAliadaEventTypeClassFrom(final String crmClass); JobInstance getJobInstance(final Integer id); void removeJobInstance(final Integer jobId); }
Cache { public JobInstance getJobInstance(final Integer id) { JobInstance instance = activeJobConfigurations.get(id); if (instance == null) { instance = jobInstanceRepository.findOne(id); if (instance != null) { adjustPrefixes(instance); activeJobConfigurations.put(id, instance); } } return instance; }  String getAliadaClassFrom(final String crmClass); Pattern getStartPattern(final String regex); Pattern getEndPattern(final String regex); String getAliadaEventTypeClassFrom(final String crmClass); JobInstance getJobInstance(final Integer id); void removeJobInstance(final Integer jobId);  }