@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(
      value = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE",
      justification = "Handled in switchIfEmpty")
  @Override
  public HouseTable save(HouseTable entity) {
    CreateUpdateEntityRequestBodyUserTable requestBody =
        new CreateUpdateEntityRequestBodyUserTable().entity(houseTableMapper.toUserTable(entity));

    return getHtsRetryTemplate(Arrays.asList(IllegalStateException.class))
        .execute(
            context ->
                apiInstance
                    .putUserTable(requestBody)
                    .map(EntityResponseBodyUserTable::getEntity)
                    .map(houseTableMapper::toHouseTable)
                    .onErrorResume(this::handleHtsHttpError)
                    .block(Duration.ofSeconds(REQUEST_TIMEOUT_SECONDS)));
  }
@Test
  public void testRepoSave() {
    EntityResponseBodyUserTable putResponse = new EntityResponseBodyUserTable();
    putResponse.entity(houseTableMapper.toUserTable(HOUSE_TABLE));
    mockHtsServer.enqueue(
        new MockResponse()
            .setResponseCode(201)
            .setBody((new Gson()).toJson(putResponse))
            .addHeader("Content-Type", "application/json"));

    HouseTable result = htsRepo.save(HOUSE_TABLE);
    Assertions.assertEquals(result.getTableId(), HOUSE_TABLE.getTableId());
    Assertions.assertEquals(result.getDatabaseId(), HOUSE_TABLE.getDatabaseId());
    Assertions.assertEquals(result.getTableLocation(), HOUSE_TABLE.getTableLocation());
    Assertions.assertEquals(result.getTableVersion(), HOUSE_TABLE.getTableVersion());
    Assertions.assertEquals(result.getStorageType(), HOUSE_TABLE.getStorageType());
  }