package com.lezhnin.yadi.simple;

import com.lezhnin.yadi.api.ServiceProvider;
import com.lezhnin.yadi.api.ServiceStorage;
import java.util.LinkedHashMap;
import java.util.Map;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public class SimpleServiceStorage implements ServiceStorage {

    private Map<Class<?>, ServiceProvider<?>> storage = new LinkedHashMap<>();

    @Nullable
    @Override
    @SuppressWarnings("unchecked")
    public <T> ServiceProvider<T> get(@Nonnull final Class<T> serviceBeanInterface) {
        return (ServiceProvider<T>) storage.get(serviceBeanInterface);
    }

    @Nonnull
    @Override
    public <T> ServiceStorage put(@Nonnull final Class<? extends T> serviceBeanInterface,
                                  @Nonnull final ServiceProvider<? extends T> serviceProvider) {
        storage.put(serviceBeanInterface, serviceProvider);
        return this;
    }
}

@@ -321,16 +321,14 @@
 Map%3C
-Class%3C?%3E
+String
 , Se
@@ -596,16 +596,26 @@
 nterface
+.getName()
 );%0A    %7D
@@ -826,24 +826,24 @@
 Provider) %7B%0A
-
         stor
@@ -870,16 +870,26 @@
 nterface
+.getName()
 , servic

change mapping to string in SimpleServiceStorage