@Test public void crmClassNotFoundInCacheButFoundInRDFStore() { final String aClassThatIsNotInCache = randomString(); final String expectedResult = randomString(); when(dao.crm2AliadaClass(aClassThatIsNotInCache)).thenReturn(expectedResult); assertEquals( expectedResult, cut.getAliadaClassFrom(aClassThatIsNotInCache)); verify(dao).crm2AliadaClass(aClassThatIsNotInCache); }
public String getAliadaClassFrom(final String crmClass) { String uri = null; if (crmClass != null) { uri = crm2AliadaClasses.get(crmClass); if (uri == null) { uri = rdfStore.crm2AliadaClass(crmClass); } } return uri != null ? uri : DEFAULT_ALIADA_CLASS; }
Cache { public String getAliadaClassFrom(final String crmClass) { String uri = null; if (crmClass != null) { uri = crm2AliadaClasses.get(crmClass); if (uri == null) { uri = rdfStore.crm2AliadaClass(crmClass); } } return uri != null ? uri : DEFAULT_ALIADA_CLASS; } }
Cache { public String getAliadaClassFrom(final String crmClass) { String uri = null; if (crmClass != null) { uri = crm2AliadaClasses.get(crmClass); if (uri == null) { uri = rdfStore.crm2AliadaClass(crmClass); } } return uri != null ? uri : DEFAULT_ALIADA_CLASS; }  }
Cache { public String getAliadaClassFrom(final String crmClass) { String uri = null; if (crmClass != null) { uri = crm2AliadaClasses.get(crmClass); if (uri == null) { uri = rdfStore.crm2AliadaClass(crmClass); } } return uri != null ? uri : DEFAULT_ALIADA_CLASS; }  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 String getAliadaClassFrom(final String crmClass) { String uri = null; if (crmClass != null) { uri = crm2AliadaClasses.get(crmClass); if (uri == null) { uri = rdfStore.crm2AliadaClass(crmClass); } } return uri != null ? uri : DEFAULT_ALIADA_CLASS; }  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);  }