### Question:
ResultServiceEventDataBuildUpdater implements AttemptAuditEventResultBuilderUpdater<ResultServiceEventData> { @Override public void update(AuditProto.AttemptAuditEventResult.Builder builder, ResultServiceEventData resultEventData) { AuditProto.ResultServiceEventData.Builder resultServiceEventDataBuilder = builderProvider.getNewResultServiceEventDataBuilder() .addAllResourceCrn(resultEventData.getResourceCrns()); doIfTrue(resultEventData.getResultDetails(), StringUtils::isNotEmpty, resultServiceEventDataBuilder::setResultDetails); builder.setResultServiceEventData(resultServiceEventDataBuilder.build()); } ResultServiceEventDataBuildUpdater(ResultServiceEventDataBuilderProvider builderProvider); @Override void update(AuditProto.AttemptAuditEventResult.Builder builder, ResultServiceEventData resultEventData); @Override Class<ResultServiceEventData> getType();  }### Answer:
@Test void testUpdateWhenResultDetailIsEmpty() { when(mockResultServiceEventData.getResultDetails()).thenReturn(""); underTest.update(mockAttemptAuditEventResult, mockResultServiceEventData); verify(mockResultServiceEventDataBuilder, never()).setResultDetails(any()); }
@Test void testUpdateWhenResultDetailIsNull() { when(mockResultServiceEventData.getResultDetails()).thenReturn(null); underTest.update(mockAttemptAuditEventResult, mockResultServiceEventData); verify(mockResultServiceEventDataBuilder, never()).setResultDetails(any()); }
@Test void testUpdateWhenResultDetailIsNotEmpty() { String detailsValue = "SomeData"; when(mockResultServiceEventData.getResultDetails()).thenReturn(detailsValue); underTest.update(mockAttemptAuditEventResult, mockResultServiceEventData); verify(mockResultServiceEventDataBuilder, times(1)).setResultDetails(any()); verify(mockResultServiceEventDataBuilder, times(1)).setResultDetails(detailsValue); }