InstanceIdentifier implements Path<InstanceIdentifier<? extends DataObject>>,
        Immutable, Serializable { public static @NonNull InstanceIdentifier<?> create(final Iterable<? extends PathArgument> pathArguments) { if (pathArguments instanceof ImmutableCollection<?>) { @SuppressWarnings("unchecked") final Iterable<PathArgument> immutableArguments = (Iterable<PathArgument>) pathArguments; return internalCreate(immutableArguments); } return internalCreate(ImmutableList.copyOf(pathArguments)); } InstanceIdentifier(final Class<T> type, final Iterable<PathArgument> pathArguments, final boolean wildcarded,
            final int hash); final @NonNull Class<T> getTargetType(); @SuppressWarnings("unchecked") final InstanceIdentifier<N> verifyTarget(final Class<N> target); final @NonNull Iterable<PathArgument> getPathArguments(); final boolean isWildcarded(); @Override final int hashCode(); @Override final boolean equals(final Object obj); @Override final String toString(); final InstanceIdentifier<I> firstIdentifierOf(final Class<I> type); final K firstKeyOf(
            final Class<N> listItem); @Override final boolean contains(final InstanceIdentifier<? extends DataObject> other); final boolean containsWildcarded(final InstanceIdentifier<?> other); final InstanceIdentifier<N> child(final Class<N> container); @SuppressWarnings("unchecked") final KeyedInstanceIdentifier<N, K> child(final Class<N> listItem, final K listKey); final InstanceIdentifier<N> child(final Class<C> caze, final Class<N> container); @SuppressWarnings("unchecked") final KeyedInstanceIdentifier<N, K> child(
                final Class<C> caze, final Class<N> listItem, final K listKey); final InstanceIdentifier<N> augmentation(
            final Class<N> container); @NonNull InstanceIdentifierBuilder<T> builder(); static InstanceIdentifierBuilder<T> builder(
            final Class<T> container); static InstanceIdentifierBuilder<T> builder(final Class<C> caze, final Class<T> container); static InstanceIdentifierBuilder<N> builder(final Class<N> listItem,
                    final K listKey); static InstanceIdentifierBuilder<N> builder(final Class<C> caze, final Class<N> listItem,
                    final K listKey); static @NonNull InstanceIdentifier<?> create(final Iterable<? extends PathArgument> pathArguments); @SuppressWarnings("unchecked") static InstanceIdentifier<T> create(final Class<T> type); static K keyOf(
            final InstanceIdentifier<N> id);  }
@Test public void serializationTest() throws Exception { final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); final ObjectOutputStream outputStream = new ObjectOutputStream(byteArrayOutputStream); final InstanceIdentifier<DataObject> instanceIdentifier = InstanceIdentifier.create(DataObject.class); outputStream.writeObject(instanceIdentifier); outputStream.flush(); outputStream.close(); final ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(byteArrayOutputStream.toByteArray()); final ObjectInputStream inputStream = new ObjectInputStream(byteArrayInputStream); final InstanceIdentifier<?> deserialized = (InstanceIdentifier<?>) inputStream.readObject(); assertEquals(instanceIdentifier, deserialized); }