class StringToBooleanConverter extends AbstractGenericConverter<String, Boolean> {

    @Override
    public Boolean convert(String source) {
        String normalize = source.trim().toLowerCase();
        if (TRUE_STRING.contains(normalize)) {
            return true;
        } else if (FALSE_STRING.contains(normalize)) {
            return false;
        } else {
            throw new ConverterException(source, getTargetTypeToken().getRawType());
        }
    }

}