TimeUtils.java

1
package com.renomad.minum.utils;
2
3
import java.time.ZoneId;
4
import java.time.ZonedDateTime;
5
import java.time.format.DateTimeFormatter;
6
import java.time.temporal.ChronoUnit;
7
8
public final class TimeUtils {
9
10
    private TimeUtils() {
11
        // cannot construct
12
    }
13
14
    public static String getTimestampIsoInstant() {
15
        ZonedDateTime now = ZonedDateTime.now(ZoneId.of("UTC"));
16 1 1. getTimestampIsoInstant : replaced return value with "" for com/renomad/minum/utils/TimeUtils::getTimestampIsoInstant → KILLED
        return getTimestampIsoInstantInner(now);
17
    }
18
19
    static String getTimestampIsoInstantInner(ZonedDateTime now) {
20 1 1. getTimestampIsoInstantInner : replaced return value with "" for com/renomad/minum/utils/TimeUtils::getTimestampIsoInstantInner → KILLED
        return now.truncatedTo(ChronoUnit.MICROS).format(DateTimeFormatter.ISO_INSTANT);
21
    }
22
}

Mutations

16

1.1
Location : getTimestampIsoInstant
Killed by : com.renomad.minum.utils.TimeUtilsTests.test_HappyPath_2(com.renomad.minum.utils.TimeUtilsTests)
replaced return value with "" for com/renomad/minum/utils/TimeUtils::getTimestampIsoInstant → KILLED

20

1.1
Location : getTimestampIsoInstantInner
Killed by : com.renomad.minum.utils.TimeUtilsTests.test_HappyPath(com.renomad.minum.utils.TimeUtilsTests)
replaced return value with "" for com/renomad/minum/utils/TimeUtils::getTimestampIsoInstantInner → KILLED

Active mutators

Tests examined


Report generated by PIT 1.17.0