// Path: honeybadger-java/src/main/java/io/honeybadger/util/HBStringUtils.java
// public final class HBStringUtils {
//     private HBStringUtils() { }
// 
//     /**
//      * Removes a single character from the end of a string if it matches.
//      * @param input String to remove from, if null returns null
//      * @param c character to match
//      * @return Original string minus matched character
//      */
//     public static String stripTrailingChar(final String input, final char c) {
//         if (input == null) return null;
//         if (input.isEmpty()) return input;
// 
//         char[] charArray = input.toCharArray();
// 
//         if (charArray[charArray.length - 1] == c) {
//             return new String(Arrays.copyOf(charArray, charArray.length - 1));
//         } else {
//             return input;
//         }
//     }
// 
//     /**
//      * Checks a string to see if it is null or empty.
//      * @param string String to check
//      * @return true if null or empty
//      */
//     public static boolean isPresent(final String string) {
//         return string != null && !string.isEmpty();
//     }
// }


import io.honeybadger.util.HBStringUtils;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
package io.honeybadger.reporter.util;



public class HBStringUtilsTest {

    @Test
    public void canTrimTrailingDot() {
        String instance = "foo.";
// Path: honeybadger-java/src/main/java/io/honeybadger/util/HBStringUtils.java
// public final class HBStringUtils {
//     private HBStringUtils() { }
// 
//     /**
//      * Removes a single character from the end of a string if it matches.
//      * @param input String to remove from, if null returns null
//      * @param c character to match
//      * @return Original string minus matched character
//      */
//     public static String stripTrailingChar(final String input, final char c) {
//         if (input == null) return null;
//         if (input.isEmpty()) return input;
// 
//         char[] charArray = input.toCharArray();
// 
//         if (charArray[charArray.length - 1] == c) {
//             return new String(Arrays.copyOf(charArray, charArray.length - 1));
//         } else {
//             return input;
//         }
//     }
// 
//     /**
//      * Checks a string to see if it is null or empty.
//      * @param string String to check
//      * @return true if null or empty
//      */
//     public static boolean isPresent(final String string) {
//         return string != null && !string.isEmpty();
//     }
// }


// Path: honeybadger-java/src/test/java/io/honeybadger/reporter/util/HBStringUtilsTest.java
import io.honeybadger.util.HBStringUtils;
import org.junit.Test;
import static org.junit.Assert.assertEquals;

package io.honeybadger.reporter.util;



public class HBStringUtilsTest {

    @Test
    public void canTrimTrailingDot() {
        String instance = "foo.";
        String out = HBStringUtils.stripTrailingChar(instance, '.');