@@ -0,0 +1,3140 @@
+/*%0A * This is free and unencumbered software released into the public domain.%0A *%0A * Anyone is free to copy, modify, publish, use, compile, sell, or%0A * distribute this software, either in source code form or as a compiled%0A * binary, for any purpose, commercial or non-commercial, and by any%0A * means.%0A *%0A * In jurisdictions that recognize copyright laws, the author or authors%0A * of this software dedicate any and all copyright interest in the%0A * software to the public domain. We make this dedication for the benefit%0A * of the public at large and to the detriment of our heirs and%0A * successors. We intend this dedication to be an overt act of%0A * relinquishment in perpetuity of all present and future rights to this%0A * software under copyright law.%0A *%0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND,%0A * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF%0A * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.%0A * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR%0A * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,%0A * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR%0A * OTHER DEALINGS IN THE SOFTWARE.%0A *%0A * For more information, please refer to %3Chttp://unlicense.org%3E%0A */%0Apackage com.github.sebhoss.units.storage;%0A%0Aimport java.math.BigInteger;%0A%0Aimport com.github.sebhoss.nullanalysis.Nullsafe;%0Aimport com.github.sebhoss.warnings.CompilerWarnings;%0A%0Aimport org.junit.Assert;%0Aimport org.junit.Test;%0A%0A/**%0A * Tests for Exbibytes.%0A */%0A@SuppressWarnings(%7B CompilerWarnings.NLS, CompilerWarnings.STATIC_METHOD %7D)%0Apublic class ExbibyteTest %7B%0A%0A    /**%0A     * Checks that a new %7B@link Exbibyte%7D instance must be created with a BigInteger.%0A     */%0A    @Test%0A    public void shouldConstructWithBigInteger() %7B%0A        // Given%0A        Exbibyte unit;%0A%0A        // When%0A        unit = new Exbibyte(Nullsafe.nullsafe(BigInteger.valueOf(1000)));%0A%0A        // Then%0A        Assert.assertNotNull(unit);%0A    %7D%0A%0A    /**%0A     * Checks that %7B@link Exbibyte#valueOf(long)%7D does not return %3Ccode%3Enull%3C/code%3E.%0A     */%0A    @Test%0A    public void shouldCreateExbibyte() %7B%0A        // Given%0A        final StorageUnit%3C?%3E unit;%0A%0A        // When%0A        unit = Exbibyte.valueOf(1000);%0A%0A        // Then%0A        Assert.assertNotNull(%22The created unit should never be NULL.%22, unit);%0A    %7D%0A%0A    /**%0A     * Checks that %7B@link Exbibyte#toString()%7D shows the correct symbol.%0A     */%0A    @Test%0A    public void shouldShowCorrectSymbol() %7B%0A        // Given%0A        final StorageUnit%3C?%3E unit;%0A%0A        // When%0A        unit = StorageUnits.exbibyte(1);%0A%0A        // Then%0A        Assert.assertTrue(%22The symbol for exabyte should be 'EiB'.%22, unit.toString().endsWith(%22EiB%22));%0A    %7D%0A%0A    /**%0A     * Checks that %7B@link Exbibyte#toString()%7D shows the correct value.%0A     */%0A    @Test%0A    public void shouldShowCorrectValue() %7B%0A        // Given%0A        final StorageUnit%3C?%3E unit;%0A%0A        // When%0A        unit = StorageUnits.exbibyte(1);%0A%0A        // Then%0A        Assert.assertTrue(%22One exbibyte should be interpreted as '1.00' exbibyte.%22, unit.toString().startsWith(%221.00%22));%0A    %7D%0A%0A%7D%0A

Add tests for Exbibytes