@@ -0,0 +1,2431 @@
+/*%0A * Copyright 2016, TeamDev Ltd. All rights reserved.%0A *%0A * Redistribution and use in source and/or binary forms, with or without%0A * modification, must retain the above copyright notice and the following%0A * disclaimer.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS%0A * %22AS IS%22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT%0A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR%0A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT%0A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,%0A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT%0A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,%0A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY%0A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE%0A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0A%0Apackage org.spine3.base;%0A%0Aimport com.google.protobuf.GeneratedMessage;%0Aimport com.google.protobuf.StringValue;%0Aimport org.junit.Test;%0Aimport org.spine3.protobuf.AnyPacker;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.spine3.base.Identifiers.newUuid;%0Aimport static org.spine3.protobuf.Timestamps.checkTimestamp;%0Aimport static org.spine3.protobuf.Values.newStringValue;%0A%0Apublic class FailureThrowableShould %7B%0A%0A    @Test%0A    public void create_instance() %7B%0A        final StringValue failure = newStringValue(newUuid());%0A%0A        final FailureThrowable failureThrowable = new TestFailure(failure);%0A%0A        assertEquals(failure, failureThrowable.getFailure());%0A        checkTimestamp(failureThrowable.getTimestamp());%0A    %7D%0A%0A    @Test%0A    public void convert_to_failure_message() %7B%0A        final StringValue failure = newStringValue(newUuid());%0A%0A        final Failure failureWrapper = new TestFailure(failure).toMessage();%0A%0A        assertEquals(failure, AnyPacker.unpack(failureWrapper.getInstance()));%0A        assertFalse(failureWrapper.getStacktrace().isEmpty());%0A        checkTimestamp(failureWrapper.getTimestamp());%0A    %7D%0A%0A    private static class TestFailure extends FailureThrowable %7B%0A%0A        protected TestFailure(GeneratedMessage failure) %7B%0A            super(failure);%0A        %7D%0A%0A        private static final long serialVersionUID = 0L;%0A    %7D%0A%7D%0A

Add and refactor tests.