class Transformers {

   static Optional<String> capabilityToTrait(String capability) {
      if(StringUtils.isBlank(capability)) {
         return Optional.empty();
      }
      String trait;
      switch(capability) {
         case SwitchCapability.NAMESPACE: trait = Constants.Trait.ON_OFF; break;
         case DimmerCapability.NAMESPACE: trait = Constants.Trait.BRIGHTNESS; break;
         case ColorCapability.NAMESPACE: trait = Constants.Trait.COLOR_SPECTRUM; break;
         case ColorTemperatureCapability.NAMESPACE: trait = Constants.Trait.COLOR_TEMPERATURE; break;
         case SceneCapability.NAMESPACE: trait = Constants.Trait.SCENE; break;
         case ThermostatCapability.NAMESPACE: trait = Constants.Trait.TEMPERATURE_SETTING; break;
         default: trait = null; break;
      }
      return Optional.ofNullable(trait);
   }

   private  Transformers();

}