### Question:
PrivateKeyTypeAdapter extends XmlAdapter<String, PrivateKeyType> { @Override public String marshal(final PrivateKeyType v) { return MAPPING .entrySet() .stream() .filter(e -> e.getValue() == v) .map(Map.Entry::getKey) .findAny() .orElse(null); }  @Override PrivateKeyType unmarshal(final String v); @Override String marshal(final PrivateKeyType v);  }### Answer:
@Test public void marshalLocked() { assertThat(adapter.marshal(PrivateKeyType.LOCKED)).isEqualTo("argon2sbox"); }
@Test public void marshalUnlocked() { assertThat(adapter.marshal(PrivateKeyType.UNLOCKED)).isEqualTo("unlocked"); }
@Test public void marshalNull() { assertThat(adapter.marshal(null)).isNull(); }