class SmileCorrectionUtils {

    public static Sensor getSensorType(Product sourceProduct) {
        String[] bandNames = sourceProduct.getBandNames();

        boolean isSensor = Stream.of(bandNames).anyMatch(p -> p.matches(SensorConstants.OLCI_NAME_PATTERN));
        if (isSensor) {
            return Sensor.OLCI;
        }

        isSensor = Stream.of(bandNames).anyMatch(p -> p.matches(SensorConstants.MERIS_NAME_PATTERN));
        if (isSensor) {
            return Sensor.MERIS;
        }

        isSensor = Stream.of(bandNames).anyMatch(p -> p.matches(SensorConstants.MERIS_4TH_NAME_PATTERN));
        if (isSensor) {
            return Sensor.MERIS_4TH;
        }

        isSensor = Stream.of(bandNames).anyMatch(p -> p.matches(SensorConstants.S2_MSI_NAME_PATTERN));
        if (isSensor) {
            return Sensor.S2_MSI;
        }

        throw new OperatorException("No supported sensor found for given source product.\n" +
                                            "Only OLCI and MERIS are supported");
    }

}