public T result() {
        return result;
    }
@Test
    public void testResult() {
        ResultOrError<Integer> resultOrError = new ResultOrError<>(123);
        assertFalse(resultOrError.isError());
        assertTrue(resultOrError.isResult());
        assertEquals(123, resultOrError.result());
        assertNull(resultOrError.error());
    }