@SuppressWarnings("unchecked")
private static <T extends Context<T>> T deserialize(String uri, JsonObject context) {
ContextUri curi = new ContextUri(uri);
NetworkContext network = SerializerFactory.getSerializer(Context.class).deserializeObject(context, NetworkContext.class);
if (!curi.getCluster().equals(network.cluster()) || !curi.getNetwork().equals(network.name())) {
throw new IllegalArgumentException("The given URI does not match the given context configuration");
}
if (curi.hasComponent()) {
ComponentContext<?> component = network.component(curi.getComponent());