public static DeweyNumber fromString(final String deweyNumberString) {
        String[] splits = deweyNumberString.split("\\.");

        if (splits.length == 1) {
            return new DeweyNumber(Integer.parseInt(deweyNumberString));
        } else if (splits.length > 0) {
            int[] deweyNumber = new int[splits.length];

            for (int i = 0; i < splits.length; i++) {
                deweyNumber[i] = Integer.parseInt(splits[i]);
            }

            return new DeweyNumber(deweyNumber);
        } else {
            throw new IllegalArgumentException(
                    "Failed to parse " + deweyNumberString + " as a Dewey number");
        }
    }
@Test(expected = IllegalArgumentException.class)
    public void testZeroSplitsDeweyNumber() {
        DeweyNumber.fromString(".");
    }