@Test public void testIsEnhetIntegreradTrue() { final String enhetsId = "enhetsId"; IntegreradEnhet enhet = new IntegreradEnhet(); enhet.setSchemaVersion1(true); when(integreradEnhetRepository.findById(eq(enhetsId))).thenReturn(Optional.of(enhet)); boolean result = registry.isEnhetIntegrerad(enhetsId, Fk7263EntryPoint.MODULE_ID); assertTrue(result); }
@Override @Transactional public boolean isEnhetIntegrerad(String enhetsHsaId, String intygType) { Optional<SchemaVersion> schemaVersion = getSchemaVersion(enhetsHsaId, intygType); return schemaVersion.isPresent(); }
IntegreradeEnheterRegistryImpl implements IntegreradeEnheterRegistry { @Override @Transactional public boolean isEnhetIntegrerad(String enhetsHsaId, String intygType) { Optional<SchemaVersion> schemaVersion = getSchemaVersion(enhetsHsaId, intygType); return schemaVersion.isPresent(); } }
IntegreradeEnheterRegistryImpl implements IntegreradeEnheterRegistry { @Override @Transactional public boolean isEnhetIntegrerad(String enhetsHsaId, String intygType) { Optional<SchemaVersion> schemaVersion = getSchemaVersion(enhetsHsaId, intygType); return schemaVersion.isPresent(); }  }
IntegreradeEnheterRegistryImpl implements IntegreradeEnheterRegistry { @Override @Transactional public boolean isEnhetIntegrerad(String enhetsHsaId, String intygType) { Optional<SchemaVersion> schemaVersion = getSchemaVersion(enhetsHsaId, intygType); return schemaVersion.isPresent(); }  @Override @Transactional void putIntegreradEnhet(IntegreradEnhetEntry entry, boolean schemaVersion1, boolean schemaVersion3); @Override @Transactional boolean isEnhetIntegrerad(String enhetsHsaId, String intygType); @Override @Transactional(readOnly = true) IntegreradEnhet getIntegreradEnhet(String enhetsId); @Override @Transactional(readOnly = true) List<IntegreradEnhet> getAllIntegreradEnhet(); @Override @Transactional void addIfSameVardgivareButDifferentUnits(String orgEnhetsHsaId, IntegreradEnhetEntry newEntry, String intygType); @Override @Transactional void deleteIntegreradEnhet(String enhetsHsaId); @Override @Transactional Optional<SchemaVersion> getSchemaVersion(String enhetsHsaId, String intygType); @Override @Transactional(readOnly = true) List<IntegreradEnhetEntryWithSchemaVersion> getIntegreradeVardenheter(); }
IntegreradeEnheterRegistryImpl implements IntegreradeEnheterRegistry { @Override @Transactional public boolean isEnhetIntegrerad(String enhetsHsaId, String intygType) { Optional<SchemaVersion> schemaVersion = getSchemaVersion(enhetsHsaId, intygType); return schemaVersion.isPresent(); }  @Override @Transactional void putIntegreradEnhet(IntegreradEnhetEntry entry, boolean schemaVersion1, boolean schemaVersion3); @Override @Transactional boolean isEnhetIntegrerad(String enhetsHsaId, String intygType); @Override @Transactional(readOnly = true) IntegreradEnhet getIntegreradEnhet(String enhetsId); @Override @Transactional(readOnly = true) List<IntegreradEnhet> getAllIntegreradEnhet(); @Override @Transactional void addIfSameVardgivareButDifferentUnits(String orgEnhetsHsaId, IntegreradEnhetEntry newEntry, String intygType); @Override @Transactional void deleteIntegreradEnhet(String enhetsHsaId); @Override @Transactional Optional<SchemaVersion> getSchemaVersion(String enhetsHsaId, String intygType); @Override @Transactional(readOnly = true) List<IntegreradEnhetEntryWithSchemaVersion> getIntegreradeVardenheter();  }