@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 testRepoSaveWithEmptyMono() {
    // Leave the entity as empty.
    EntityResponseBodyUserTable putResponse = new EntityResponseBodyUserTable();
    mockHtsServer.enqueue(
        new MockResponse()
            .setResponseCode(200)
            .setBody((new Gson()).toJson(putResponse))
            .addHeader("Content-Type", "application/json"));
    Assertions.assertThrowsExactly(
        RuntimeException.class,
        () -> htsRepo.save(HOUSE_TABLE),
        "Unexpected null value from publisher.");
  }