public static <T> T[] getBeans(Class<T> interfaceClass) {
        Object object = serviceMap.get(interfaceClass.getName());
        if(object == null) return null;
        if(object instanceof Object[]) {
            return (T[])object;
        } else {
            Object array = Array.newInstance(interfaceClass, 1);
            Array.set(array, 0, object);
            return (T[])array;
        }
    }
@Test
    public void testGetMultipleBean() {
        Processor[] processors = SingletonServiceFactory.getBeans(Processor.class);
        Assert.assertEquals(processors.length, 3);
        Arrays.stream(processors).forEach(processor -> logger.debug(processor.process()));
    }