Repository: microsoft/gctoolkit
File: IT/src/test/java/com/microsoft/gctoolkit/integration/ZeroAggregationTest.java (Java)

Code before:
import com.microsoft.gctoolkit.integration.io.TestLogFile;
import com.microsoft.gctoolkit.io.GCLogFile;
import com.microsoft.gctoolkit.io.SingleGCLogFile;
import com.microsoft.gctoolkit.jvm.JavaVirtualMachine;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import java.io.IOException;
import java.nio.file.Path;
import java.util.Optional;

import static org.junit.jupiter.api.Assertions.fail;

public class ZeroAggregationTest {

    @Test
    public void testNoAggregationRegistered() {
        Path path = new TestLogFile("cms/defnew/details/defnew.log").getFile().toPath();
        /*
         * GC log files can come in  one of two types: single or series of rolling logs.
         * In this sample, we load a single log file.
         * The log files can be either in text, zip, or gzip format.
         */
        GCLogFile logFile = new SingleGCLogFile(path);
        GCToolKit gcToolKit = new GCToolKit();
        /* Do not call GCToolKit::loadAggregationsFromServiceLoader */
        JavaVirtualMachine machine = null;
        try {
            machine = gcToolKit.analyze(logFile);
        } catch (IOException e) {
            fail(e.getMessage());
        }

        // Retrieves the Aggregation for HeapOccupancyAfterCollectionSummary. This is a time-series aggregation.
        Assertions.assertTrue(machine.getAggregation(HeapOccupancyAfterCollectionSummary.class).isEmpty());
        Assertions.assertTrue(machine.getAggregation(CollectionCycleCountsSummary.class).isEmpty());
    }

    @Test
    public void testSuppliedAggregation() {
        Path path = new TestLogFile("cms/defnew/details/defnew.log").getFile().toPath();        /*
         * GC log files can come in  one of two types: single or series of rolling logs.
         * In this sample, we load a single log file.
         * The log files can be either in text, zip, or gzip format.
         */
        GCLogFile logFile = new SingleGCLogFile(path);
        GCToolKit gcToolKit = new GCToolKit();
        /* Load our local Aggregation that will not registered for the given log file */
        gcToolKit.registerAggregation(new ZeroAggregationTest.TestAggregation());
        JavaVirtualMachine machine = null;
        try {

Review comment (suggestion):
```suggestion
        // Do not call GCToolKit::loadAggregationsFromServiceLoader
```

Code after:
import com.microsoft.gctoolkit.integration.io.TestLogFile;
import com.microsoft.gctoolkit.io.GCLogFile;
import com.microsoft.gctoolkit.io.SingleGCLogFile;
import com.microsoft.gctoolkit.jvm.JavaVirtualMachine;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

import java.io.IOException;
import java.nio.file.Path;
import java.util.Optional;

import static org.junit.jupiter.api.Assertions.fail;

public class ZeroAggregationTest {

    @Test
    public void testNoAggregationRegistered() {
        Path path = new TestLogFile("cms/defnew/details/defnew.log").getFile().toPath();
        /*
         * GC log files can come in  one of two types: single or series of rolling logs.
         * In this sample, we load a single log file.
         * The log files can be either in text, zip, or gzip format.
         */
        GCLogFile logFile = new SingleGCLogFile(path);
        GCToolKit gcToolKit = new GCToolKit();
        // Do not call GCToolKit::loadAggregationsFromServiceLoader
        JavaVirtualMachine machine = null;
        try {
            machine = gcToolKit.analyze(logFile);
        } catch (IOException e) {
            fail(e.getMessage());
        }

        // Retrieves the Aggregation for HeapOccupancyAfterCollectionSummary. This is a time-series aggregation.
        Assertions.assertTrue(machine.getAggregation(HeapOccupancyAfterCollectionSummary.class).isEmpty());
        Assertions.assertTrue(machine.getAggregation(CollectionCycleCountsSummary.class).isEmpty());
    }

    @Test
    public void testSuppliedAggregation() {
        Path path = new TestLogFile("cms/defnew/details/defnew.log").getFile().toPath();
        /*
         * GC log files can come in  one of two types: single or series of rolling logs.
         * In this sample, we load a single log file.
         * The log files can be either in text, zip, or gzip format.
         */
        GCLogFile logFile = new SingleGCLogFile(path);
        GCToolKit gcToolKit = new GCToolKit();
        // Load our local Aggregation that will not registered for the given log file
        gcToolKit.registerAggregation(new ZeroAggregationTest.TestAggregation());
        JavaVirtualMachine machine = null;