<commit_before>/*
 * Copyright © 2012 <NAME> <<EMAIL>>
 * This work is free. You can redistribute it and/or modify it under the
 * terms of the Do What The Fuck You Want To Public License, Version 2,
 * as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
 */
package com.github.sebhoss.units.storage;

import java.math.BigInteger;

import com.github.sebhoss.nullanalysis.Nullsafe;
import com.github.sebhoss.warnings.CompilerWarnings;

import org.junit.Assert;
import org.junit.Test;

/**
 * Tests for Zettabytes.
 */
@SuppressWarnings({ CompilerWarnings.NLS, CompilerWarnings.STATIC_METHOD })
public class ZettabyteTest {

    /**
     * Checks that a new {@link Zettabyte} instance must be created with a BigInteger.
     */
    @Test
    public void shouldConstructWithBigInteger() {
        // Given
        Zettabyte unit;

        // When
        unit = new Zettabyte(Nullsafe.nullsafe(BigInteger.valueOf(1000)));

        // Then
        Assert.assertNotNull(unit);
    }

    /**
     * Checks that {@link Zettabyte#valueOf(long)} does not return <code>null</code>.
     */
    @Test
    public void shouldCreateMegabyte() {
        // Given
        final StorageUnit<?> unit;

        // When
        unit = Zettabyte.valueOf(1000);

        // Then
        Assert.assertNotNull("The created unit should never be NULL.", unit);
    }

    /**
     * Checks that {@link Zettabyte#toString()} shows the correct symbol.
     */
    @Test
    public void shouldShowCorrectSymbol() {
        // Given
        final StorageUnit<?> unit;

        // When
        unit = StorageUnits.zettabyte(1);

        // Then
        Assert.assertTrue("The symbol for zettabyte should be 'ZB'.", unit.toString().endsWith("ZB"));
    }

    /**
     * Checks that {@link Zettabyte#toString()} shows the correct value.<commit_msg>Fixed test case name<commit_after>/*
 * Copyright © 2012 <NAME> <<EMAIL>>
 * This work is free. You can redistribute it and/or modify it under the
 * terms of the Do What The Fuck You Want To Public License, Version 2,
 * as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.
 */
package com.github.sebhoss.units.storage;

import java.math.BigInteger;

import com.github.sebhoss.nullanalysis.Nullsafe;
import com.github.sebhoss.warnings.CompilerWarnings;

import org.junit.Assert;
import org.junit.Test;

/**
 * Tests for Zettabytes.
 */
@SuppressWarnings({ CompilerWarnings.NLS, CompilerWarnings.STATIC_METHOD })
public class ZettabyteTest {

    /**
     * Checks that a new {@link Zettabyte} instance must be created with a BigInteger.
     */
    @Test
    public void shouldConstructWithBigInteger() {
        // Given
        Zettabyte unit;

        // When
        unit = new Zettabyte(Nullsafe.nullsafe(BigInteger.valueOf(1000)));

        // Then
        Assert.assertNotNull(unit);
    }

    /**
     * Checks that {@link Zettabyte#valueOf(long)} does not return <code>null</code>.
     */
    @Test
    public void shouldCreateZettybyte() {
        // Given
        final StorageUnit<?> unit;

        // When
        unit = Zettabyte.valueOf(1000);

        // Then
        Assert.assertNotNull("The created unit should never be NULL.", unit);
    }

    /**
     * Checks that {@link Zettabyte#toString()} shows the correct symbol.
     */
    @Test
    public void shouldShowCorrectSymbol() {
        // Given
        final StorageUnit<?> unit;

        // When
        unit = StorageUnits.zettabyte(1);

        // Then
        Assert.assertTrue("The symbol for zettabyte should be 'ZB'.", unit.toString().endsWith("ZB"));
    }

    /**
     * Checks that {@link Zettabyte#toString()} shows the correct value.
{'fraction_non_alphanumeric': 0.11617806731813246, 'fraction_numerical': 0.00760043431053203, 'mean_word_length': 2.536468330134357, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1693803', 'n_tokens_mistral': 1115, 'n_tokens_neox': 1090, 'n_words': 310}