@Test public void testGetIntegreradEnhet() { final String enhetsId = "enhetsId"; IntegreradEnhet enhet = new IntegreradEnhet(); enhet.setEnhetsId(enhetsId); when(integreradEnhetRepository.findById(eq(enhetsId))).thenReturn(Optional.of(enhet)); IntegreradEnhet integreradEnhet = registry.getIntegreradEnhet(enhetsId); assertEquals(integreradEnhet.getEnhetsId(), enhetsId); }
@Override @Transactional(readOnly = true) public IntegreradEnhet getIntegreradEnhet(String enhetsId) { return integreradEnhetRepository.findById(enhetsId).orElse(null); }
IntegreradeEnheterRegistryImpl implements IntegreradeEnheterRegistry { @Override @Transactional(readOnly = true) public IntegreradEnhet getIntegreradEnhet(String enhetsId) { return integreradEnhetRepository.findById(enhetsId).orElse(null); } }
IntegreradeEnheterRegistryImpl implements IntegreradeEnheterRegistry { @Override @Transactional(readOnly = true) public IntegreradEnhet getIntegreradEnhet(String enhetsId) { return integreradEnhetRepository.findById(enhetsId).orElse(null); }  }
IntegreradeEnheterRegistryImpl implements IntegreradeEnheterRegistry { @Override @Transactional(readOnly = true) public IntegreradEnhet getIntegreradEnhet(String enhetsId) { return integreradEnhetRepository.findById(enhetsId).orElse(null); }  @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(readOnly = true) public IntegreradEnhet getIntegreradEnhet(String enhetsId) { return integreradEnhetRepository.findById(enhetsId).orElse(null); }  @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();  }