From e3204e56faf332f7ab2aaa986173fc32c4c5b881 Mon Sep 17 00:00:00 2001 From: Russell Dodd Date: Fri, 19 Jan 2024 11:20:23 +0000 Subject: [PATCH] Add some more tests for legacy data marshalling --- .../gov/hmcts/opal/dto/AccountSearchDto.java | 8 ++ .../uk/gov/hmcts/opal/dto/ToJsonString.java | 14 ++-- .../repository/jpa/DefendantAccountSpecs.java | 3 +- .../opal/service/DefendantAccountService.java | 6 +- .../gov/hmcts/opal/service/LegacyService.java | 2 +- .../dto/DefendantAccountSearchCriteria.java | 18 ++++- .../dto/DefendantAccountsSearchResults.java | 3 +- .../LegacyDefendantAccountServiceTest.java | 10 +-- .../DefendantAccountSearchCriteriaTest.java | 81 +++++++++++++++++++ .../dto/DefendantAccountSearchResultTest.java | 45 +++++++++-- .../DefendantAccountsSearchResultsTest.java | 71 ++++++++++++++++ 11 files changed, 234 insertions(+), 27 deletions(-) create mode 100644 src/test/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountSearchCriteriaTest.java create mode 100644 src/test/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountsSearchResultsTest.java diff --git a/src/main/java/uk/gov/hmcts/opal/dto/AccountSearchDto.java b/src/main/java/uk/gov/hmcts/opal/dto/AccountSearchDto.java index 49315b768..d4aeb55c5 100644 --- a/src/main/java/uk/gov/hmcts/opal/dto/AccountSearchDto.java +++ b/src/main/java/uk/gov/hmcts/opal/dto/AccountSearchDto.java @@ -3,6 +3,7 @@ import lombok.Builder; import lombok.Data; +import java.util.Optional; @Data @Builder @@ -29,4 +30,11 @@ public class AccountSearchDto implements ToJsonString { private String majorCreditor; /** Unsure. */ private String tillNumber; + + public Long getNumericCourt() { + return Optional.ofNullable(getCourt()) + .filter(s -> s.matches("[0-9]+")) + .map(Long::parseLong) + .orElse(null); + } } diff --git a/src/main/java/uk/gov/hmcts/opal/dto/ToJsonString.java b/src/main/java/uk/gov/hmcts/opal/dto/ToJsonString.java index 9400b5c37..0e574d8ad 100644 --- a/src/main/java/uk/gov/hmcts/opal/dto/ToJsonString.java +++ b/src/main/java/uk/gov/hmcts/opal/dto/ToJsonString.java @@ -7,8 +7,11 @@ public interface ToJsonString { + static final ObjectMapper objectMapper = new ObjectMapper() + .registerModule(new JavaTimeModule()); + default String toJsonString() throws JsonProcessingException { - return newObjectMapper() + return getObjectMapper() .writeValueAsString(this); } @@ -21,7 +24,7 @@ default String toJson() { } default String toPrettyJsonString() throws JsonProcessingException { - return newObjectMapper() + return getObjectMapper() .writerWithDefaultPrettyPrinter() .writeValueAsString(this); } @@ -35,12 +38,11 @@ default String toPrettyJson() { } default JsonNode toJsonNode() throws JsonProcessingException { - return newObjectMapper() + return getObjectMapper() .readTree(this.toJsonString()); } - static ObjectMapper newObjectMapper() { - return new ObjectMapper() - .registerModule(new JavaTimeModule()); + static ObjectMapper getObjectMapper() { + return objectMapper; } } diff --git a/src/main/java/uk/gov/hmcts/opal/repository/jpa/DefendantAccountSpecs.java b/src/main/java/uk/gov/hmcts/opal/repository/jpa/DefendantAccountSpecs.java index e45cdd10c..20dfa919d 100644 --- a/src/main/java/uk/gov/hmcts/opal/repository/jpa/DefendantAccountSpecs.java +++ b/src/main/java/uk/gov/hmcts/opal/repository/jpa/DefendantAccountSpecs.java @@ -32,8 +32,7 @@ public static Specification findByAccountSearch(AccountS notBlank(accountSearchDto.getNiNumber()).map(DefendantAccountSpecs::likeNiNumber), notBlank(accountSearchDto.getAddressLineOne()).map(DefendantAccountSpecs::likeAddressLine1), notNullLocalDate(accountSearchDto.getDateOfBirth()).map(DefendantAccountSpecs::equalsDateOfBirth), - Optional.ofNullable(accountSearchDto.getCourt()).filter(s -> s.matches("[0-9]+")).map(Long::parseLong) - .map(DefendantAccountSpecs::equalsAnyCourtId) + Optional.ofNullable(accountSearchDto.getNumericCourt()).map(DefendantAccountSpecs::equalsAnyCourtId) )); } diff --git a/src/main/java/uk/gov/hmcts/opal/service/DefendantAccountService.java b/src/main/java/uk/gov/hmcts/opal/service/DefendantAccountService.java index d331705b6..063b191b8 100644 --- a/src/main/java/uk/gov/hmcts/opal/service/DefendantAccountService.java +++ b/src/main/java/uk/gov/hmcts/opal/service/DefendantAccountService.java @@ -39,7 +39,7 @@ import java.util.Optional; import java.util.stream.Collectors; -import static uk.gov.hmcts.opal.dto.ToJsonString.newObjectMapper; +import static uk.gov.hmcts.opal.dto.ToJsonString.getObjectMapper; @Service @Transactional @@ -87,7 +87,7 @@ public AccountSearchResultsDto searchDefendantAccounts(AccountSearchDto accountS try (InputStream in = Thread.currentThread().getContextClassLoader() .getResourceAsStream("tempSearchData.json")) { - ObjectMapper mapper = newObjectMapper(); + ObjectMapper mapper = getObjectMapper(); AccountSearchResultsDto dto = mapper.readValue(in, AccountSearchResultsDto.class); log.info(":searchDefendantAccounts: temporary Hack for Front End testing. Read JSON file: \n{}", dto.toPrettyJsonString()); @@ -121,7 +121,7 @@ public AccountDetailsDto getAccountDetailsByDefendantAccountId(Long defendantAcc try (InputStream in = Thread.currentThread().getContextClassLoader() .getResourceAsStream("tempDetailsData.json")) { - ObjectMapper mapper = newObjectMapper(); + ObjectMapper mapper = getObjectMapper(); AccountDetailsDto dto = mapper.readValue(in, AccountDetailsDto.class); log.info( """ diff --git a/src/main/java/uk/gov/hmcts/opal/service/LegacyService.java b/src/main/java/uk/gov/hmcts/opal/service/LegacyService.java index 10e48609e..42d88adec 100644 --- a/src/main/java/uk/gov/hmcts/opal/service/LegacyService.java +++ b/src/main/java/uk/gov/hmcts/opal/service/LegacyService.java @@ -28,7 +28,7 @@ public T extractResponse(ResponseEntity responseEntity, Class clz getLog().info("extractResponse: Raw JSON response: {}", rawJson); try { - ObjectMapper objectMapper = ToJsonString.newObjectMapper(); + ObjectMapper objectMapper = ToJsonString.getObjectMapper(); JsonNode root = objectMapper.readTree(rawJson); return objectMapper.treeToValue(root, clzz); diff --git a/src/main/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountSearchCriteria.java b/src/main/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountSearchCriteria.java index e215bae8e..248152869 100644 --- a/src/main/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountSearchCriteria.java +++ b/src/main/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountSearchCriteria.java @@ -1,5 +1,6 @@ package uk.gov.hmcts.opal.service.legacy.dto; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AllArgsConstructor; import lombok.Builder; @@ -16,37 +17,50 @@ @AllArgsConstructor public class DefendantAccountSearchCriteria implements ToJsonString { + @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty("account_number") private String accountNumber; + @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty("business_unit_id") - private Integer businessUnitId; + private Long businessUnitId; + @JsonInclude(JsonInclude.Include.NON_NULL) private Boolean organisation; + @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty("organisation_name") private String organisationName; + @JsonInclude(JsonInclude.Include.NON_NULL) private String surname; + @JsonInclude(JsonInclude.Include.NON_NULL) private String forenames; + @JsonInclude(JsonInclude.Include.NON_NULL) private String initials; + @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty("birth_date") private String birthDate; + @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty("national_insurance_number") private String nationalInsuranceNumber; + @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty("prosecutor_case_reference") private String prosecutorCaseReference; + @JsonInclude(JsonInclude.Include.NON_NULL) @JsonProperty("address_line_1") private String addressLine1; + @JsonInclude(JsonInclude.Include.NON_NULL) private Boolean searchAliases; + @JsonInclude(JsonInclude.Include.NON_NULL) private Boolean liveOnly; private Integer firstRowNumber; @@ -63,7 +77,7 @@ public static DefendantAccountSearchCriteria fromAccountSearchDto(AccountSearchD .addressLine1(dto.getAddressLineOne()) .nationalInsuranceNumber(dto.getNiNumber()) .prosecutorCaseReference(dto.getPcr()) - .businessUnitId(Optional.ofNullable(dto.getCourt()).map(s -> 1).orElse(1)) + .businessUnitId(dto.getNumericCourt()) //.organisation_name(no organisation name) //.searchAliases( dunno ) //.liveOnly( dunno ) diff --git a/src/main/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountsSearchResults.java b/src/main/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountsSearchResults.java index cc91d10c8..054222d0d 100644 --- a/src/main/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountsSearchResults.java +++ b/src/main/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountsSearchResults.java @@ -5,6 +5,7 @@ import lombok.Data; import lombok.NoArgsConstructor; import uk.gov.hmcts.opal.dto.AccountSearchResultsDto; +import uk.gov.hmcts.opal.dto.ToJsonString; import java.util.Collections; import java.util.List; @@ -15,7 +16,7 @@ @Builder @NoArgsConstructor @AllArgsConstructor -public class DefendantAccountsSearchResults { +public class DefendantAccountsSearchResults implements ToJsonString { List defendantAccountsSearchResult; diff --git a/src/test/java/uk/gov/hmcts/opal/service/LegacyDefendantAccountServiceTest.java b/src/test/java/uk/gov/hmcts/opal/service/LegacyDefendantAccountServiceTest.java index abe72bfc7..f315a1844 100644 --- a/src/test/java/uk/gov/hmcts/opal/service/LegacyDefendantAccountServiceTest.java +++ b/src/test/java/uk/gov/hmcts/opal/service/LegacyDefendantAccountServiceTest.java @@ -64,7 +64,7 @@ void putDefendantAccount_SuccessfulResponse() throws Exception { DefendantAccountEntity expectedAccountEntity = DefendantAccountServiceTest.buildDefendantAccountEntity(); - String jsonBody = ToJsonString.newObjectMapper().writeValueAsString(inputAccountEntity); + String jsonBody = ToJsonString.getObjectMapper().writeValueAsString(inputAccountEntity); ResponseEntity successfulResponseEntity = new ResponseEntity<>(jsonBody, HttpStatus.OK); when(restTemplate.postForEntity(any(String.class), any(DefendantAccountEntity.class), any(Class.class))) @@ -102,7 +102,7 @@ void putDefendantAccount_FailureCodeResponse() throws Exception { // Arrange final DefendantAccountEntity inputAccountEntity = DefendantAccountServiceTest.buildDefendantAccountEntity(); - String jsonBody = ToJsonString.newObjectMapper().writeValueAsString(inputAccountEntity); + String jsonBody = ToJsonString.getObjectMapper().writeValueAsString(inputAccountEntity); ResponseEntity unsuccessfulResponseEntity = new ResponseEntity<>( jsonBody, HttpStatus.INTERNAL_SERVER_ERROR); @@ -146,7 +146,7 @@ void getParty_SuccessfulResponse() throws Exception { DefendantAccountEntity expectedAccountEntity = DefendantAccountServiceTest.buildDefendantAccountEntity(); - String jsonBody = ToJsonString.newObjectMapper().writeValueAsString(inputAccountEntity); + String jsonBody = ToJsonString.getObjectMapper().writeValueAsString(inputAccountEntity); ResponseEntity successfulResponseEntity = new ResponseEntity<>(jsonBody, HttpStatus.OK); when(restTemplate.getForEntity(any(String.class), any(Class.class), any(AccountEnquiryDto.class))) @@ -188,7 +188,7 @@ void getParty_FailureCodeResponse() throws Exception { final DefendantAccountEntity inputAccountEntity = DefendantAccountServiceTest.buildDefendantAccountEntity(); - String jsonBody = ToJsonString.newObjectMapper().writeValueAsString(inputAccountEntity); + String jsonBody = ToJsonString.getObjectMapper().writeValueAsString(inputAccountEntity); ResponseEntity unsuccessfulResponseEntity = new ResponseEntity<>( jsonBody, HttpStatus.INTERNAL_SERVER_ERROR); @@ -231,7 +231,7 @@ void searchForParty_SuccessfulResponse() throws Exception { // Arrange DefendantAccountsSearchResults resultsDto = DefendantAccountsSearchResults.builder() .totalCount(9L).build(); - String jsonBody = ToJsonString.newObjectMapper().writeValueAsString(resultsDto); + String jsonBody = ToJsonString.getObjectMapper().writeValueAsString(resultsDto); ResponseEntity successfulResponseEntity = new ResponseEntity<>(jsonBody, HttpStatus.OK); when(restTemplate.postForEntity(any(String.class), any(DefendantAccountSearchCriteria.class), any(Class.class))) diff --git a/src/test/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountSearchCriteriaTest.java b/src/test/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountSearchCriteriaTest.java new file mode 100644 index 000000000..abf4a9309 --- /dev/null +++ b/src/test/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountSearchCriteriaTest.java @@ -0,0 +1,81 @@ +package uk.gov.hmcts.opal.service.legacy.dto; + +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Test; +import uk.gov.hmcts.opal.dto.ToJsonString; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static uk.gov.hmcts.opal.service.legacy.dto.DefendantAccountSearchCriteria.DefendantAccountSearchCriteriaBuilder; + +@Slf4j +public class DefendantAccountSearchCriteriaTest { + + @Test + public void testBuilder() throws InterruptedException { + DefendantAccountSearchCriteria criteria = constructDefendantAccountSearchCriteria(); + + assertEquals("accountNo", criteria.getAccountNumber()); + assertEquals("John", criteria.getForenames()); + assertEquals("D", criteria.getInitials()); + assertEquals("Smith", criteria.getSurname()); + assertEquals("1977-06-26", criteria.getBirthDate()); + assertEquals("Glasgow", criteria.getAddressLine1()); + assertEquals("XX123456C", criteria.getNationalInsuranceNumber()); + assertEquals(1L, criteria.getBusinessUnitId()); + assertNull(criteria.getOrganisationName()); + assertNull(criteria.getProsecutorCaseReference()); + } + + @Test + public void testNullBusinessUnit() { + DefendantAccountSearchCriteriaBuilder criteriaBuilder = constructDefendantAccountSearchCriteriaBuilder(); + DefendantAccountSearchCriteria criteria = criteriaBuilder.businessUnitId(null).build(); + assertNull(criteria.getBusinessUnitId()); + assertEquals(getJsonRepresentation(), criteria.toPrettyJson()); + } + + @Test + public void testJsonString() throws Exception { + DefendantAccountSearchCriteria model = constructDefendantAccountSearchCriteria(); + assertNotNull(model.toJsonString()); + + DefendantAccountSearchCriteria parsed = ToJsonString.getObjectMapper() + .readValue(getJsonRepresentation(), DefendantAccountSearchCriteria.class); + assertNotNull(parsed); + } + + private DefendantAccountSearchCriteria constructDefendantAccountSearchCriteria() { + return constructDefendantAccountSearchCriteriaBuilder().build(); + } + + private DefendantAccountSearchCriteriaBuilder constructDefendantAccountSearchCriteriaBuilder() { + return DefendantAccountSearchCriteria.builder() + .accountNumber("accountNo") + .addressLine1("Glasgow") + .businessUnitId(1L) + .firstRowNumber(4) + .lastRowNumber(44) + .surname("Smith") + .forenames("John") + .initials("D") + .birthDate("1977-06-26") + .nationalInsuranceNumber("XX123456C"); + } + + private String getJsonRepresentation() { + return """ + { + "surname" : "Smith", + "forenames" : "John", + "initials" : "D", + "firstRowNumber" : 4, + "lastRowNumber" : 44, + "account_number" : "accountNo", + "birth_date" : "1977-06-26", + "national_insurance_number" : "XX123456C", + "address_line_1" : "Glasgow" + }"""; + } +} diff --git a/src/test/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountSearchResultTest.java b/src/test/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountSearchResultTest.java index 1ed49d1d5..8bc2a8dc0 100644 --- a/src/test/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountSearchResultTest.java +++ b/src/test/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountSearchResultTest.java @@ -1,8 +1,10 @@ package uk.gov.hmcts.opal.service.legacy.dto; +import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.Test; import uk.gov.hmcts.opal.dto.AccountEnquiryDto; import uk.gov.hmcts.opal.dto.AccountSummaryDto; +import uk.gov.hmcts.opal.dto.ToJsonString; import java.math.BigDecimal; import java.time.LocalDate; @@ -10,13 +12,14 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; +@Slf4j public class DefendantAccountSearchResultTest { @Test public void testBuilder() { DefendantAccountSearchResult accountEnquiryDto = constructTestDefendantAccountSearchResult(); - assertEquals("accountNameNo", accountEnquiryDto.getAccountNumber()); + assertEquals("accountNo", accountEnquiryDto.getAccountNumber()); assertEquals("Mr John Smith", accountEnquiryDto.getFullName()); assertEquals("Scotland", accountEnquiryDto.getAddressLine1()); assertEquals("1977-06-26", accountEnquiryDto.getBirthDate()); @@ -27,12 +30,16 @@ public void testBuilder() { } @Test - public void testToJsonString() throws Exception { - DefendantAccountSearchResult accountEnquiryDto = constructTestDefendantAccountSearchResult(); + public void testJsonString() throws Exception { + DefendantAccountSearchResult model = constructTestDefendantAccountSearchResult(); + assertNotNull(model.toJsonString()); - assertNotNull(accountEnquiryDto.toJsonString()); + DefendantAccountsSearchResults parsed = ToJsonString.getObjectMapper() + .readValue(getJsonRepresentation(), DefendantAccountsSearchResults.class); + assertNotNull(parsed); } + @Test public void testControllerModelEqualsAndHashCode() { // Arrange @@ -59,7 +66,7 @@ public void testControllerModelToAccountSummaryDto() { AccountSummaryDto dto = model2.toAccountSummaryDto(); assertEquals("Mr John Smith", dto.getName()); - assertEquals("accountNameNo", dto.getAccountNo()); + assertEquals("accountNo", dto.getAccountNo()); assertEquals("Cardiff", dto.getCourt()); assertEquals(12345L, dto.getDefendantAccountId()); assertEquals(BigDecimal.valueOf(1000), dto.getBalance()); @@ -68,9 +75,9 @@ public void testControllerModelToAccountSummaryDto() { } - private DefendantAccountSearchResult constructTestDefendantAccountSearchResult() { + public static DefendantAccountSearchResult constructTestDefendantAccountSearchResult() { return DefendantAccountSearchResult.builder() - .accountNumber("accountNameNo") + .accountNumber("accountNo") .defendantAccountId(12345L) .surname("Smith") .forenames("John") @@ -82,4 +89,28 @@ private DefendantAccountSearchResult constructTestDefendantAccountSearchResult() .businessUnitName("Cardiff") .build(); } + + private String getJsonRepresentation() { + return """ + { + "defendantAccountsSearchResult" : [ { + "accountNumber" : "accountNo", + "organisation" : null, + "title" : "Mr", + "surname" : "Smith", + "forenames" : "John", + "initials" : null, + "rowNumber" : null, + "defendant_account_id" : 12345, + "business_unit_id" : 9, + "business_unit_name" : "Cardiff", + "organisation_name" : null, + "birth_date" : "1977-06-26", + "address_line_1" : "Scotland", + "account_balance" : 1000 + } ], + "totalCount" : 1 + } + """; + } } diff --git a/src/test/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountsSearchResultsTest.java b/src/test/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountsSearchResultsTest.java new file mode 100644 index 000000000..b0537b6b0 --- /dev/null +++ b/src/test/java/uk/gov/hmcts/opal/service/legacy/dto/DefendantAccountsSearchResultsTest.java @@ -0,0 +1,71 @@ +package uk.gov.hmcts.opal.service.legacy.dto; + +import lombok.extern.slf4j.Slf4j; +import org.junit.jupiter.api.Test; +import uk.gov.hmcts.opal.dto.ToJsonString; + +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +@Slf4j +public class DefendantAccountsSearchResultsTest { + + @Test + public void testBuilder() { + DefendantAccountsSearchResults searchResults = constructTestDefendantAccountsSearchResults(); + + assertEquals(1L, searchResults.getTotalCount()); + assertNotNull(searchResults.getDefendantAccountsSearchResult()); + assertEquals(1, searchResults.getDefendantAccountsSearchResult().size()); + assertEquals( + DefendantAccountSearchResultTest.constructTestDefendantAccountSearchResult(), + searchResults.getDefendantAccountsSearchResult().get(0) + ); + + } + + @Test + public void testJsonString() throws Exception { + DefendantAccountsSearchResults model = constructTestDefendantAccountsSearchResults(); + assertNotNull(model.toJsonString()); + + DefendantAccountsSearchResults parsed = ToJsonString.getObjectMapper() + .readValue(getJsonRepresentation(), DefendantAccountsSearchResults.class); + assertNotNull(parsed); + } + + + private DefendantAccountsSearchResults constructTestDefendantAccountsSearchResults() { + return DefendantAccountsSearchResults.builder() + .totalCount(1L) + .defendantAccountsSearchResult(List.of(DefendantAccountSearchResultTest + .constructTestDefendantAccountSearchResult())) + .build(); + } + + private String getJsonRepresentation() { + return """ + { + "defendantAccountsSearchResult" : [ { + "accountNumber" : "accountNo", + "organisation" : null, + "title" : "Mr", + "surname" : "Smith", + "forenames" : "John", + "initials" : null, + "rowNumber" : null, + "defendant_account_id" : 12345, + "business_unit_id" : 9, + "business_unit_name" : "Cardiff", + "organisation_name" : null, + "birth_date" : "1977-06-26", + "address_line_1" : "Scotland", + "account_balance" : 1000 + } ], + "totalCount" : 1 + } + """; + } +}