### Question:
SparkUtil { @Contract("_, null -> _; _, !null -> !null") @Nullable public static <T> T getOrElse(@Nullable final Option<T> option, @Nullable final T defaultValue) { return (option == null || option.isEmpty()) ? defaultValue : option.get(); } private  SparkUtil(); @Contract("_, null -> _; _, !null -> !null") @Nullable static T getOrElse(@Nullable final Option<T> option, @Nullable final T defaultValue); @Nonnull static URL parseUrl(@Nonnull final String s); @Nonnull static DataFrameReader prepareDataFrameReader(@Nonnull final DataFrameReader reader, @Nonnull final DataSetOptions options, @Nullable final KyloCatalogClient client); @Nonnull static DataFrameWriter prepareDataFrameWriter(@Nonnull final DataFrameWriter writer, @Nonnull final DataSetOptions options, @Nullable final KyloCatalogClient client); static String resolveDataSource(@Nonnull final DataSetOptions options, @Nullable final KyloCatalogClient client); @Nonnull static SaveMode toSaveMode(final String s);  }### Answer:
@Test public void getOrElse() { Assert.assertEquals("optionValue", SparkUtil.getOrElse(Option.apply("optionValue"), "defaultValue")); Assert.assertEquals("defaultValue", SparkUtil.getOrElse(Option.<String>empty(), "defaultValue")); }