
package io.silverware.microservices.providers.cluster;

import io.silverware.microservices.providers.cluster.internal.RemoteServiceHandleStoreTest;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

/**
 * Basic Utils used in tests
 *
 * @author Slavomír Krupa (slavomir.krupa@gmail.com)
 */
public class Util {
   public static RemoteServiceHandle createHandle(int handle) {
      return new RemoteServiceHandle(org.jgroups.util.UUID.randomUUID(), 1, null, RemoteServiceHandleStoreTest.META_DATA);
   }

   public static <T> Set<T> createSetFrom(T... components) {
      return new HashSet<>(Arrays.asList(components));
   }

}
