### Question:
InMemoryAlertManager implements AlertManager { @Override public Alert.ID resolve(Serializable ser) { if (ser instanceof String) { return new AlertID((String) ser); } else if (ser instanceof UUID) { return new AlertID((UUID) ser); } else if (ser instanceof AlertID) { return (AlertID) ser; } else { throw new IllegalArgumentException("Invalid ID source format: " + ser.getClass()); } } InMemoryAlertManager(); @Override ID getId(); void setReceiversExecutor(Executor receiversExecutor); @Override Set<AlertDescriptor> getAlertDescriptors(); void setAlertDescriptors(Collection<AlertDescriptor> types); @Override void updateLastUpdatedTime(); @Override boolean addDescriptor(AlertDescriptor descriptor); @Override void addReceiver(AlertNotifyReceiver receiver); @Override void removeReceiver(AlertNotifyReceiver receiver); @Override Optional<Alert> getAlert(Alert.ID id); @Override Optional<Alert> getAlertAsServiceAccount(Alert.ID id); @Override AlertCriteria criteria(); @Override Alert.ID resolve(Serializable ser); @Override Iterator<Alert> getAlerts(AlertCriteria criteria); @Override Iterator<AlertSummary> getAlertsSummary(AlertCriteria criteria); @Override Alert create(URI type,String subtype, Alert.Level level, String description, C content); @Override Alert createEntityAlert(URI type, Alert.Level level, String description, EntityIdentificationAlertContent<C> content); @Override AlertResponse getResponse(Alert alert); @Override Alert remove(Alert.ID id); @Override Long getLastUpdatedTime(); @Override EntityIdentificationAlertContent createEntityIdentificationAlertContent(String entityId, SecurityRole.ENTITY_TYPE entityType, C content); static final int MAX_ALERTS; }### Answer:
@Test public void testResolve() { Alert.ID id = this.manager.create(URI.create("urn:alert:test"), "subtype", Alert.Level.INFO, "test", "content").getId(); Alert.ID resolved = this.manager.resolve(id.toString()); assertThat(resolved).isEqualTo(id); }