@Override
  public Map<String, String> loadProjectSettings() {
    return load(scannerProperties.getProjectKey());
  }
@Test
  public void loadProjectSettings() throws IOException {
    WsResponse response = mock(WsResponse.class);
    PipedOutputStream out = new PipedOutputStream();
    PipedInputStream in = new PipedInputStream(out);
    Settings.ValuesWsResponse.newBuilder()
      .addSettings(Settings.Setting.newBuilder()
        .setKey("abc").setValue("def")
        .build())
      .addSettings(Settings.Setting.newBuilder()
        .setKey("123").setValue("456")
        .build())
      .build()
      .writeTo(out);
    out.close();
    when(response.contentStream()).thenReturn(in);
    when(wsClient.call(any())).thenReturn(response);
    when(properties.getProjectKey()).thenReturn("project_key");

    Map<String, String> result = underTest.loadProjectSettings();

    ArgumentCaptor<GetRequest> argumentCaptor = ArgumentCaptor.forClass(GetRequest.class);
    verify(wsClient, times(1)).call(argumentCaptor.capture());
    assertThat(argumentCaptor.getValue().getPath()).isEqualTo("api/settings/values.protobuf?component=project_key");
    assertThat(result)
      .isNotNull()
      .hasSize(2)
      .containsEntry("abc", "def")
      .containsEntry("123", "456");
  }