@Test void testUpdateWhenResponseParametersAreEmpty() { when(resultEventData.getResponseParameters()).thenReturn(""); underTest.update(mockAttemptAuditEventResultBuilder, resultEventData); verify(mockResultApiRequestDataBuilder, never()).setResponseParameters(anyString()); }
@Override public void update(AuditProto.AttemptAuditEventResult.Builder builder, ResultApiRequestData resultEventData) { AuditProto.ResultApiRequestData.Builder resultApiRequestDataBuilder = builderProvider.getNewResultApiRequestDataBuilder(); doIfTrue(resultEventData.getResponseParameters(), StringUtils::isNotEmpty, resultApiRequestDataBuilder::setResponseParameters); builder.setResultApiRequestData(resultApiRequestDataBuilder.build()); }
ResultApiRequestDataBuildUpdater implements AttemptAuditEventResultBuilderUpdater<ResultApiRequestData> { @Override public void update(AuditProto.AttemptAuditEventResult.Builder builder, ResultApiRequestData resultEventData) { AuditProto.ResultApiRequestData.Builder resultApiRequestDataBuilder = builderProvider.getNewResultApiRequestDataBuilder(); doIfTrue(resultEventData.getResponseParameters(), StringUtils::isNotEmpty, resultApiRequestDataBuilder::setResponseParameters); builder.setResultApiRequestData(resultApiRequestDataBuilder.build()); } }
ResultApiRequestDataBuildUpdater implements AttemptAuditEventResultBuilderUpdater<ResultApiRequestData> { @Override public void update(AuditProto.AttemptAuditEventResult.Builder builder, ResultApiRequestData resultEventData) { AuditProto.ResultApiRequestData.Builder resultApiRequestDataBuilder = builderProvider.getNewResultApiRequestDataBuilder(); doIfTrue(resultEventData.getResponseParameters(), StringUtils::isNotEmpty, resultApiRequestDataBuilder::setResponseParameters); builder.setResultApiRequestData(resultApiRequestDataBuilder.build()); } ResultApiRequestDataBuildUpdater(ResultApiRequestDataBuilderProvider builderProvider); }
ResultApiRequestDataBuildUpdater implements AttemptAuditEventResultBuilderUpdater<ResultApiRequestData> { @Override public void update(AuditProto.AttemptAuditEventResult.Builder builder, ResultApiRequestData resultEventData) { AuditProto.ResultApiRequestData.Builder resultApiRequestDataBuilder = builderProvider.getNewResultApiRequestDataBuilder(); doIfTrue(resultEventData.getResponseParameters(), StringUtils::isNotEmpty, resultApiRequestDataBuilder::setResponseParameters); builder.setResultApiRequestData(resultApiRequestDataBuilder.build()); } ResultApiRequestDataBuildUpdater(ResultApiRequestDataBuilderProvider builderProvider); @Override void update(AuditProto.AttemptAuditEventResult.Builder builder, ResultApiRequestData resultEventData); @Override Class<ResultApiRequestData> getType(); }
ResultApiRequestDataBuildUpdater implements AttemptAuditEventResultBuilderUpdater<ResultApiRequestData> { @Override public void update(AuditProto.AttemptAuditEventResult.Builder builder, ResultApiRequestData resultEventData) { AuditProto.ResultApiRequestData.Builder resultApiRequestDataBuilder = builderProvider.getNewResultApiRequestDataBuilder(); doIfTrue(resultEventData.getResponseParameters(), StringUtils::isNotEmpty, resultApiRequestDataBuilder::setResponseParameters); builder.setResultApiRequestData(resultApiRequestDataBuilder.build()); } ResultApiRequestDataBuildUpdater(ResultApiRequestDataBuilderProvider builderProvider); @Override void update(AuditProto.AttemptAuditEventResult.Builder builder, ResultApiRequestData resultEventData); @Override Class<ResultApiRequestData> getType();  }