class ByteArrayToListResolveDependencyStrategy implements IResolveDependencyStrategy {

    @Override
    public <T> T resolve(final Object... args) throws ResolveDependencyStrategyException {
        try {

            byte[] bytes = (byte[]) args[0];
            List<Byte> result = new ArrayList<>(bytes.length);
            for (byte aByte : bytes) {
                result.add(aByte);
            }

            return (T) result;
        } catch (Exception e) {
            throw new ResolveDependencyStrategyException("Can't create list from byte array.", e);
        }
    }

}