@Test
public void testUpdateFactTypeWithDefaultConfidence() throws Exception {

  UpdateFactTypeRequest request = new UpdateFactTypeRequest()
          .setId(UUID.randomUUID())
          .setDefaultConfidence(0.1f);
  FactTypeEntity existingEntity = new FactTypeEntity();
  when(factTypeRequestResolver.fetchExistingFactType(request.getId())).thenReturn(existingEntity);
  delegate.handle(request);
  verify(factTypeResponseConverter).apply(existingEntity);
  verify(factManager).saveFactType(argThat(entity -> {
    assertSame(existingEntity, entity);
    assertEquals(request.getDefaultConfidence(), entity.getDefaultConfidence(), 0.0);
    return true;
  }));
}