Search in sources :

Example 11 with ProgressWrapper

use of org.sonarsource.sonarlint.core.util.ProgressWrapper in project sonarlint-core by SonarSource.

the class ModuleStorageUpdateExecutorTest method test_server_issues_are_downloaded_and_stored.

@Test
public void test_server_issues_are_downloaded_and_stored() throws IOException {
    WsClientTestUtils.addResponse(wsClient, getQualityProfileUrl(), newEmptyStream());
    when(storageReader.readQProfiles()).thenReturn(QProfiles.getDefaultInstance());
    when(storagePaths.getModuleStorageRoot(MODULE_KEY_WITH_BRANCH)).thenReturn(temp.newFolder().toPath());
    ScannerInput.ServerIssue fileIssue1 = ScannerInput.ServerIssue.newBuilder().setModuleKey("someModuleKey").setPath("some/path").setRuleKey("squid:x").build();
    ScannerInput.ServerIssue fileIssue2 = ScannerInput.ServerIssue.newBuilder().setModuleKey("someModuleKey").setPath("some/path").setRuleKey("squid:y").build();
    ScannerInput.ServerIssue anotherFileIssue = ScannerInput.ServerIssue.newBuilder().setModuleKey("someModuleKey").setPath("another/path").build();
    ScannerInput.ServerIssue notDownloadedIssue = ScannerInput.ServerIssue.newBuilder().setModuleKey("someModuleKey").setPath("yet/another/path").build();
    IssueDownloader issueDownloader = moduleKey -> Arrays.asList(fileIssue1, fileIssue2, anotherFileIssue);
    moduleUpdate = new ModuleStorageUpdateExecutor(storageReader, storagePaths, wsClient, issueDownloader, issueStoreFactory, tempFolder, moduleConfigurationDownloader);
    moduleUpdate.update(MODULE_KEY_WITH_BRANCH, new ProgressWrapper(null));
    assertThat(issueStore.load(createFileKey(fileIssue1))).containsOnly(fileIssue1, fileIssue2);
    assertThat(issueStore.load(createFileKey(anotherFileIssue))).containsOnly(anotherFileIssue);
    assertThat(issueStore.load(createFileKey(notDownloadedIssue))).isEmpty();
}
Also used : ScannerInput(org.sonar.scanner.protocol.input.ScannerInput) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) Arrays(java.util.Arrays) SonarLintWsClient(org.sonarsource.sonarlint.core.container.connected.SonarLintWsClient) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) IssueStoreFactory(org.sonarsource.sonarlint.core.container.connected.IssueStoreFactory) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) RunWith(org.junit.runner.RunWith) Parameters(org.junit.runners.Parameterized.Parameters) HashMap(java.util.HashMap) StoragePaths(org.sonarsource.sonarlint.core.container.storage.StoragePaths) Map(java.util.Map) QProfiles(org.sonarsource.sonarlint.core.proto.Sonarlint.QProfiles) Path(java.nio.file.Path) ExpectedException(org.junit.rules.ExpectedException) ModuleConfigurationDownloader(org.sonarsource.sonarlint.core.container.connected.update.ModuleConfigurationDownloader) Nullable(javax.annotation.Nullable) Parameterized(org.junit.runners.Parameterized) TempFolder(org.sonar.api.utils.TempFolder) Before(org.junit.Before) IssueStore(org.sonarsource.sonarlint.core.container.connected.IssueStore) GlobalProperties(org.sonarsource.sonarlint.core.proto.Sonarlint.GlobalProperties) ProgressWrapper(org.sonarsource.sonarlint.core.util.ProgressWrapper) ModuleQualityProfilesDownloader(org.sonarsource.sonarlint.core.container.connected.update.ModuleQualityProfilesDownloader) IssueDownloader(org.sonarsource.sonarlint.core.container.connected.update.IssueDownloader) SettingsDownloader(org.sonarsource.sonarlint.core.container.connected.update.SettingsDownloader) StorageReader(org.sonarsource.sonarlint.core.container.storage.StorageReader) ProtobufUtilTest.newEmptyStream(org.sonarsource.sonarlint.core.container.storage.ProtobufUtilTest.newEmptyStream) IOException(java.io.IOException) Test(org.junit.Test) WsClientTestUtils(org.sonarsource.sonarlint.core.WsClientTestUtils) ModuleConfiguration(org.sonarsource.sonarlint.core.proto.Sonarlint.ModuleConfiguration) Mockito.when(org.mockito.Mockito.when) ScannerInput(org.sonar.scanner.protocol.input.ScannerInput) Assertions.entry(org.assertj.core.api.Assertions.entry) File(java.io.File) InMemoryIssueStore(org.sonarsource.sonarlint.core.container.connected.InMemoryIssueStore) Rule(org.junit.Rule) StringUtils(org.sonarsource.sonarlint.core.util.StringUtils) ProtobufUtil(org.sonarsource.sonarlint.core.container.storage.ProtobufUtil) IssueUtils.createFileKey(org.sonarsource.sonarlint.core.container.connected.update.IssueUtils.createFileKey) ModuleHierarchyDownloader(org.sonarsource.sonarlint.core.container.connected.update.ModuleHierarchyDownloader) ServerInfos(org.sonarsource.sonarlint.core.proto.Sonarlint.ServerInfos) Collections(java.util.Collections) TemporaryFolder(org.junit.rules.TemporaryFolder) Mockito.mock(org.mockito.Mockito.mock) ProgressWrapper(org.sonarsource.sonarlint.core.util.ProgressWrapper) IssueDownloader(org.sonarsource.sonarlint.core.container.connected.update.IssueDownloader) Test(org.junit.Test)

Example 12 with ProgressWrapper

use of org.sonarsource.sonarlint.core.util.ProgressWrapper in project sonarlint-core by SonarSource.

the class ModuleStorageUpdateExecutorTest method exception_ws_load_qps.

@Test
public void exception_ws_load_qps() throws IOException {
    when(wsClient.get(getQualityProfileUrl())).thenThrow(IOException.class);
    File destDir = temp.newFolder();
    QProfiles.Builder builder = QProfiles.newBuilder();
    builder.putQprofilesByKey("java-empty-74333", QProfiles.QProfile.newBuilder().build());
    when(storageReader.readQProfiles()).thenReturn(builder.build());
    when(storagePaths.getModuleStorageRoot(MODULE_KEY_WITH_BRANCH)).thenReturn(destDir.toPath());
    moduleUpdate = new ModuleStorageUpdateExecutor(storageReader, storagePaths, wsClient, (key) -> Collections.emptyList(), issueStoreFactory, tempFolder, moduleConfigurationDownloader);
    exception.expect(IllegalStateException.class);
    exception.expectMessage("Failed to load module quality profiles");
    moduleUpdate.update(MODULE_KEY_WITH_BRANCH, new ProgressWrapper(null));
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) Arrays(java.util.Arrays) SonarLintWsClient(org.sonarsource.sonarlint.core.container.connected.SonarLintWsClient) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) IssueStoreFactory(org.sonarsource.sonarlint.core.container.connected.IssueStoreFactory) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) RunWith(org.junit.runner.RunWith) Parameters(org.junit.runners.Parameterized.Parameters) HashMap(java.util.HashMap) StoragePaths(org.sonarsource.sonarlint.core.container.storage.StoragePaths) Map(java.util.Map) QProfiles(org.sonarsource.sonarlint.core.proto.Sonarlint.QProfiles) Path(java.nio.file.Path) ExpectedException(org.junit.rules.ExpectedException) ModuleConfigurationDownloader(org.sonarsource.sonarlint.core.container.connected.update.ModuleConfigurationDownloader) Nullable(javax.annotation.Nullable) Parameterized(org.junit.runners.Parameterized) TempFolder(org.sonar.api.utils.TempFolder) Before(org.junit.Before) IssueStore(org.sonarsource.sonarlint.core.container.connected.IssueStore) GlobalProperties(org.sonarsource.sonarlint.core.proto.Sonarlint.GlobalProperties) ProgressWrapper(org.sonarsource.sonarlint.core.util.ProgressWrapper) ModuleQualityProfilesDownloader(org.sonarsource.sonarlint.core.container.connected.update.ModuleQualityProfilesDownloader) IssueDownloader(org.sonarsource.sonarlint.core.container.connected.update.IssueDownloader) SettingsDownloader(org.sonarsource.sonarlint.core.container.connected.update.SettingsDownloader) StorageReader(org.sonarsource.sonarlint.core.container.storage.StorageReader) ProtobufUtilTest.newEmptyStream(org.sonarsource.sonarlint.core.container.storage.ProtobufUtilTest.newEmptyStream) IOException(java.io.IOException) Test(org.junit.Test) WsClientTestUtils(org.sonarsource.sonarlint.core.WsClientTestUtils) ModuleConfiguration(org.sonarsource.sonarlint.core.proto.Sonarlint.ModuleConfiguration) Mockito.when(org.mockito.Mockito.when) ScannerInput(org.sonar.scanner.protocol.input.ScannerInput) Assertions.entry(org.assertj.core.api.Assertions.entry) File(java.io.File) InMemoryIssueStore(org.sonarsource.sonarlint.core.container.connected.InMemoryIssueStore) Rule(org.junit.Rule) StringUtils(org.sonarsource.sonarlint.core.util.StringUtils) ProtobufUtil(org.sonarsource.sonarlint.core.container.storage.ProtobufUtil) IssueUtils.createFileKey(org.sonarsource.sonarlint.core.container.connected.update.IssueUtils.createFileKey) ModuleHierarchyDownloader(org.sonarsource.sonarlint.core.container.connected.update.ModuleHierarchyDownloader) ServerInfos(org.sonarsource.sonarlint.core.proto.Sonarlint.ServerInfos) Collections(java.util.Collections) TemporaryFolder(org.junit.rules.TemporaryFolder) Mockito.mock(org.mockito.Mockito.mock) ProgressWrapper(org.sonarsource.sonarlint.core.util.ProgressWrapper) File(java.io.File) QProfiles(org.sonarsource.sonarlint.core.proto.Sonarlint.QProfiles) Test(org.junit.Test)

Example 13 with ProgressWrapper

use of org.sonarsource.sonarlint.core.util.ProgressWrapper in project sonarlint-core by SonarSource.

the class ModuleStorageUpdateExecutorTest method test_error_if_qp_doesnt_exist.

@Test
public void test_error_if_qp_doesnt_exist() throws IOException {
    File destDir = temp.newFolder();
    QProfiles.Builder builder = QProfiles.newBuilder();
    Map<String, QProfiles.QProfile> mutableQprofilesByKey = builder.getMutableQprofilesByKey();
    mutableQprofilesByKey.put("cs-sonar-way-58886", QProfiles.QProfile.newBuilder().build());
    mutableQprofilesByKey.put("java-empty-74333", QProfiles.QProfile.newBuilder().build());
    mutableQprofilesByKey.put("xoo2-basic-34035", QProfiles.QProfile.newBuilder().build());
    when(storageReader.readQProfiles()).thenReturn(builder.build());
    when(storagePaths.getModuleStorageRoot(MODULE_KEY_WITH_BRANCH)).thenReturn(destDir.toPath());
    moduleUpdate = new ModuleStorageUpdateExecutor(storageReader, storagePaths, wsClient, (key) -> Collections.emptyList(), issueStoreFactory, tempFolder, moduleConfigurationDownloader);
    exception.expect(IllegalStateException.class);
    exception.expectMessage("is associated to quality profile 'js-sonar-way-60746' that is not in the storage");
    moduleUpdate.update(MODULE_KEY_WITH_BRANCH, new ProgressWrapper(null));
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) Arrays(java.util.Arrays) SonarLintWsClient(org.sonarsource.sonarlint.core.container.connected.SonarLintWsClient) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) IssueStoreFactory(org.sonarsource.sonarlint.core.container.connected.IssueStoreFactory) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) RunWith(org.junit.runner.RunWith) Parameters(org.junit.runners.Parameterized.Parameters) HashMap(java.util.HashMap) StoragePaths(org.sonarsource.sonarlint.core.container.storage.StoragePaths) Map(java.util.Map) QProfiles(org.sonarsource.sonarlint.core.proto.Sonarlint.QProfiles) Path(java.nio.file.Path) ExpectedException(org.junit.rules.ExpectedException) ModuleConfigurationDownloader(org.sonarsource.sonarlint.core.container.connected.update.ModuleConfigurationDownloader) Nullable(javax.annotation.Nullable) Parameterized(org.junit.runners.Parameterized) TempFolder(org.sonar.api.utils.TempFolder) Before(org.junit.Before) IssueStore(org.sonarsource.sonarlint.core.container.connected.IssueStore) GlobalProperties(org.sonarsource.sonarlint.core.proto.Sonarlint.GlobalProperties) ProgressWrapper(org.sonarsource.sonarlint.core.util.ProgressWrapper) ModuleQualityProfilesDownloader(org.sonarsource.sonarlint.core.container.connected.update.ModuleQualityProfilesDownloader) IssueDownloader(org.sonarsource.sonarlint.core.container.connected.update.IssueDownloader) SettingsDownloader(org.sonarsource.sonarlint.core.container.connected.update.SettingsDownloader) StorageReader(org.sonarsource.sonarlint.core.container.storage.StorageReader) ProtobufUtilTest.newEmptyStream(org.sonarsource.sonarlint.core.container.storage.ProtobufUtilTest.newEmptyStream) IOException(java.io.IOException) Test(org.junit.Test) WsClientTestUtils(org.sonarsource.sonarlint.core.WsClientTestUtils) ModuleConfiguration(org.sonarsource.sonarlint.core.proto.Sonarlint.ModuleConfiguration) Mockito.when(org.mockito.Mockito.when) ScannerInput(org.sonar.scanner.protocol.input.ScannerInput) Assertions.entry(org.assertj.core.api.Assertions.entry) File(java.io.File) InMemoryIssueStore(org.sonarsource.sonarlint.core.container.connected.InMemoryIssueStore) Rule(org.junit.Rule) StringUtils(org.sonarsource.sonarlint.core.util.StringUtils) ProtobufUtil(org.sonarsource.sonarlint.core.container.storage.ProtobufUtil) IssueUtils.createFileKey(org.sonarsource.sonarlint.core.container.connected.update.IssueUtils.createFileKey) ModuleHierarchyDownloader(org.sonarsource.sonarlint.core.container.connected.update.ModuleHierarchyDownloader) ServerInfos(org.sonarsource.sonarlint.core.proto.Sonarlint.ServerInfos) Collections(java.util.Collections) TemporaryFolder(org.junit.rules.TemporaryFolder) Mockito.mock(org.mockito.Mockito.mock) ProgressWrapper(org.sonarsource.sonarlint.core.util.ProgressWrapper) File(java.io.File) QProfiles(org.sonarsource.sonarlint.core.proto.Sonarlint.QProfiles) Test(org.junit.Test)

Example 14 with ProgressWrapper

use of org.sonarsource.sonarlint.core.util.ProgressWrapper in project sonarlint-core by SonarSource.

the class ConnectedSonarLintEngineImpl method update.

@Override
public UpdateResult update(ServerConfiguration serverConfig, @Nullable ProgressMonitor monitor) {
    checkNotNull(serverConfig);
    setLogging(null);
    return withRwLock(() -> {
        stop(false);
        changeState(State.UPDATING);
        List<SonarAnalyzer> analyzers;
        try {
            analyzers = runInConnectedContainer(serverConfig, container -> container.update(new ProgressWrapper(monitor)));
        } finally {
            start();
        }
        return new UpdateResult(getHandler().getGlobalStorageStatus(), analyzers);
    });
}
Also used : LoggedErrorHandler(org.sonarsource.sonarlint.core.util.LoggedErrorHandler) LoggerFactory(org.slf4j.LoggerFactory) ModuleStorageStatus(org.sonarsource.sonarlint.core.client.api.connected.ModuleStorageStatus) GlobalUpdateRequiredException(org.sonarsource.sonarlint.core.client.api.exceptions.GlobalUpdateRequiredException) ReentrantReadWriteLock(java.util.concurrent.locks.ReentrantReadWriteLock) ConnectedAnalysisConfiguration(org.sonarsource.sonarlint.core.client.api.connected.ConnectedAnalysisConfiguration) ServerIssue(org.sonarsource.sonarlint.core.client.api.connected.ServerIssue) Function(java.util.function.Function) Supplier(java.util.function.Supplier) ConnectedGlobalConfiguration(org.sonarsource.sonarlint.core.client.api.connected.ConnectedGlobalConfiguration) RemoteModule(org.sonarsource.sonarlint.core.client.api.connected.RemoteModule) IssueListener(org.sonarsource.sonarlint.core.client.api.common.analysis.IssueListener) UpdateResult(org.sonarsource.sonarlint.core.client.api.connected.UpdateResult) Map(java.util.Map) StorageContainerHandler(org.sonarsource.sonarlint.core.container.storage.StorageContainerHandler) LoadedAnalyzer(org.sonarsource.sonarlint.core.client.api.connected.LoadedAnalyzer) SonarLintLogging(org.sonarsource.sonarlint.core.log.SonarLintLogging) ReadWriteLock(java.util.concurrent.locks.ReadWriteLock) Nullable(javax.annotation.Nullable) ConnectedSonarLintEngine(org.sonarsource.sonarlint.core.client.api.connected.ConnectedSonarLintEngine) StorageUpdateCheckResult(org.sonarsource.sonarlint.core.client.api.connected.StorageUpdateCheckResult) StorageContainer(org.sonarsource.sonarlint.core.container.storage.StorageContainer) ProgressWrapper(org.sonarsource.sonarlint.core.util.ProgressWrapper) Logger(org.slf4j.Logger) StorageException(org.sonarsource.sonarlint.core.client.api.exceptions.StorageException) RuleDetails(org.sonarsource.sonarlint.core.client.api.common.RuleDetails) Predicate(java.util.function.Predicate) Collection(java.util.Collection) Preconditions.checkNotNull(com.google.common.base.Preconditions.checkNotNull) Set(java.util.Set) ProgressMonitor(org.sonarsource.sonarlint.core.client.api.common.ProgressMonitor) ServerConfiguration(org.sonarsource.sonarlint.core.client.api.connected.ServerConfiguration) StateListener(org.sonarsource.sonarlint.core.client.api.connected.StateListener) List(java.util.List) ConnectedContainer(org.sonarsource.sonarlint.core.container.connected.ConnectedContainer) SonarLintWrappedException(org.sonarsource.sonarlint.core.client.api.exceptions.SonarLintWrappedException) AnalysisResults(org.sonarsource.sonarlint.core.client.api.common.analysis.AnalysisResults) GlobalStorageStatus(org.sonarsource.sonarlint.core.client.api.connected.GlobalStorageStatus) LogOutput(org.sonarsource.sonarlint.core.client.api.common.LogOutput) SonarAnalyzer(org.sonarsource.sonarlint.core.client.api.connected.SonarAnalyzer) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) ProgressWrapper(org.sonarsource.sonarlint.core.util.ProgressWrapper) SonarAnalyzer(org.sonarsource.sonarlint.core.client.api.connected.SonarAnalyzer) UpdateResult(org.sonarsource.sonarlint.core.client.api.connected.UpdateResult)

Example 15 with ProgressWrapper

use of org.sonarsource.sonarlint.core.util.ProgressWrapper in project sonarlint-core by SonarSource.

the class ConnectedSonarLintEngineImpl method checkIfModuleStorageNeedUpdate.

@Override
public StorageUpdateCheckResult checkIfModuleStorageNeedUpdate(ServerConfiguration serverConfig, String moduleKey, @Nullable ProgressMonitor monitor) {
    checkNotNull(serverConfig);
    checkNotNull(moduleKey);
    return withReadLock(() -> runInConnectedContainer(serverConfig, container -> container.checkForUpdate(moduleKey, new ProgressWrapper(monitor))));
}
Also used : LoggedErrorHandler(org.sonarsource.sonarlint.core.util.LoggedErrorHandler) LoggerFactory(org.slf4j.LoggerFactory) ModuleStorageStatus(org.sonarsource.sonarlint.core.client.api.connected.ModuleStorageStatus) GlobalUpdateRequiredException(org.sonarsource.sonarlint.core.client.api.exceptions.GlobalUpdateRequiredException) ReentrantReadWriteLock(java.util.concurrent.locks.ReentrantReadWriteLock) ConnectedAnalysisConfiguration(org.sonarsource.sonarlint.core.client.api.connected.ConnectedAnalysisConfiguration) ServerIssue(org.sonarsource.sonarlint.core.client.api.connected.ServerIssue) Function(java.util.function.Function) Supplier(java.util.function.Supplier) ConnectedGlobalConfiguration(org.sonarsource.sonarlint.core.client.api.connected.ConnectedGlobalConfiguration) RemoteModule(org.sonarsource.sonarlint.core.client.api.connected.RemoteModule) IssueListener(org.sonarsource.sonarlint.core.client.api.common.analysis.IssueListener) UpdateResult(org.sonarsource.sonarlint.core.client.api.connected.UpdateResult) Map(java.util.Map) StorageContainerHandler(org.sonarsource.sonarlint.core.container.storage.StorageContainerHandler) LoadedAnalyzer(org.sonarsource.sonarlint.core.client.api.connected.LoadedAnalyzer) SonarLintLogging(org.sonarsource.sonarlint.core.log.SonarLintLogging) ReadWriteLock(java.util.concurrent.locks.ReadWriteLock) Nullable(javax.annotation.Nullable) ConnectedSonarLintEngine(org.sonarsource.sonarlint.core.client.api.connected.ConnectedSonarLintEngine) StorageUpdateCheckResult(org.sonarsource.sonarlint.core.client.api.connected.StorageUpdateCheckResult) StorageContainer(org.sonarsource.sonarlint.core.container.storage.StorageContainer) ProgressWrapper(org.sonarsource.sonarlint.core.util.ProgressWrapper) Logger(org.slf4j.Logger) StorageException(org.sonarsource.sonarlint.core.client.api.exceptions.StorageException) RuleDetails(org.sonarsource.sonarlint.core.client.api.common.RuleDetails) Predicate(java.util.function.Predicate) Collection(java.util.Collection) Preconditions.checkNotNull(com.google.common.base.Preconditions.checkNotNull) Set(java.util.Set) ProgressMonitor(org.sonarsource.sonarlint.core.client.api.common.ProgressMonitor) ServerConfiguration(org.sonarsource.sonarlint.core.client.api.connected.ServerConfiguration) StateListener(org.sonarsource.sonarlint.core.client.api.connected.StateListener) List(java.util.List) ConnectedContainer(org.sonarsource.sonarlint.core.container.connected.ConnectedContainer) SonarLintWrappedException(org.sonarsource.sonarlint.core.client.api.exceptions.SonarLintWrappedException) AnalysisResults(org.sonarsource.sonarlint.core.client.api.common.analysis.AnalysisResults) GlobalStorageStatus(org.sonarsource.sonarlint.core.client.api.connected.GlobalStorageStatus) LogOutput(org.sonarsource.sonarlint.core.client.api.common.LogOutput) SonarAnalyzer(org.sonarsource.sonarlint.core.client.api.connected.SonarAnalyzer) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) ProgressWrapper(org.sonarsource.sonarlint.core.util.ProgressWrapper)

Aggregations

ProgressWrapper (org.sonarsource.sonarlint.core.util.ProgressWrapper)38 Test (org.junit.Test)31 SonarLintWsClient (org.sonarsource.sonarlint.core.container.connected.SonarLintWsClient)14 File (java.io.File)11 StorageUpdateCheckResult (org.sonarsource.sonarlint.core.client.api.connected.StorageUpdateCheckResult)9 GlobalProperties (org.sonarsource.sonarlint.core.proto.Sonarlint.GlobalProperties)8 Map (java.util.Map)6 Nullable (javax.annotation.Nullable)6 ServerInfos (org.sonarsource.sonarlint.core.proto.Sonarlint.ServerInfos)6 Path (java.nio.file.Path)5 IssueListener (org.sonarsource.sonarlint.core.client.api.common.analysis.IssueListener)5 IOException (java.io.IOException)4 Arrays (java.util.Arrays)4 Collections (java.util.Collections)4 HashMap (java.util.HashMap)4 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)4 Assertions.entry (org.assertj.core.api.Assertions.entry)4 Before (org.junit.Before)4 Rule (org.junit.Rule)4 ExpectedException (org.junit.rules.ExpectedException)4