### Question:
BasicAuthPasswordVariableAccessor extends VariableAccessor { @Override public List<ReportDatum> generateReportData(String componentName) { Component component = new Component() .withName(new CiString.CiString50(componentName)); VariableAttribute variableAttribute = new VariableAttribute() .withValue(new CiString.CiString1000("")) .withPersistence(true) .withConstant(true) .withMutability(WRITE_ONLY); VariableCharacteristics variableCharacteristics = new VariableCharacteristics() .withDataType(STRING) .withSupportsMonitoring(false); ReportDatum reportDatum = new ReportDatum() .withComponent(component) .withVariable(new Variable().withName(new CiString.CiString50(NAME))) .withVariableCharacteristics(variableCharacteristics) .withVariableAttribute(singletonList(variableAttribute)); return singletonList(reportDatum); } BasicAuthPasswordVariableAccessor(Station station, StationStore stationStore); @Override String getVariableName(); @Override Map<AttributeType, VariableGetter> getVariableGetters(); @Override Map<AttributeType, VariableSetter> getVariableSetters(); @Override Map<AttributeType, SetVariableValidator> getVariableValidators(); @Override List<ReportDatum> generateReportData(String componentName); @Override boolean isMutable();  }### Answer:
@Test void expectWriteOnlyReportData() { List<ReportDatum> reportData = basicAuthPasswordVariableAccessor.generateReportData(SECURITY_COMPONENT_NAME); ReportDatum reportDatum = reportData.get(0); assertThat(reportDatum.getComponent().getName().toString()).isEqualTo(SECURITY_COMPONENT_NAME); assertThat(reportDatum.getVariable().getName().toString()).isEqualTo(BASIC_AUTH_PASSWORD_VARIABLE_NAME); VariableAttribute variableAttribute = reportDatum.getVariableAttribute().get(0); assertThat(variableAttribute.getMutability()).isEqualTo(WRITE_ONLY); }
@Test void expectEmptyPasswordInReportData() { List<ReportDatum> reportData = basicAuthPasswordVariableAccessor.generateReportData(SECURITY_COMPONENT_NAME); ReportDatum reportDatum = reportData.get(0); VariableAttribute variableAttribute = reportDatum.getVariableAttribute().get(0); assertThat(variableAttribute.getValue().toString()).isEmpty(); }