ResultUtils { public static long toConventionalIndex(final AxisType type, final long index) { final Stream<AxisType> oneAxes = Stream.of(Axes.Z, Axes.CHANNEL, Axes.TIME); if (oneAxes.anyMatch(t -> t.equals(type))) { return index + 1; } return index; } private  ResultUtils(); static char getExponent(final S space); static String getSizeDescription(final S space); static String getUnitHeader(
		final S space, final UnitService unitService, final char exponent); static String getUnitHeader(final ImagePlus imagePlus); static long toConventionalIndex(final AxisType type,
		final long index);  }
@Test public void testToConventionalIndex() { final Stream<AxisType> types = Stream.of(Axes.X, Axes.Y, Axes.Z, Axes.CHANNEL, Axes.TIME); final Iterator<Long> expectedIndices = Stream.of(0L, 0L, 1L, 1L, 1L) .iterator(); types.map(type -> ResultUtils.toConventionalIndex(type, 0)).forEach( i -> assertEquals(expectedIndices.next().longValue(), i.longValue())); }
@Test public void testToConventionalIndexNullType() { assertEquals(0, ResultUtils.toConventionalIndex(null, 0)); }