### Question:
Options { @NonNull public static Options parse(TypefaceLoader typefaceManager, JSONObject json) { Options result = new Options(); if (json == null) return result; result.topBar = TopBarOptions.parse(typefaceManager, json.optJSONObject("topBar")); result.topTabs = TopTabsOptions.parse(json.optJSONObject("topTabs")); result.topTabOptions = TopTabOptions.parse(typefaceManager, json.optJSONObject("topTab")); result.bottomTabOptions = BottomTabOptions.parse(typefaceManager, json.optJSONObject("bottomTab")); result.bottomTabsOptions = BottomTabsOptions.parse(json.optJSONObject("bottomTabs")); result.overlayOptions = OverlayOptions.parse(json.optJSONObject("overlay")); result.fabOptions = FabOptions.parse(json.optJSONObject("fab")); result.sideMenuRootOptions = SideMenuRootOptions.parse(json.optJSONObject("sideMenu")); result.animations = AnimationsOptions.parse(json.optJSONObject("animations")); result.modal = ModalOptions.parse(json); result.statusBar = StatusBarOptions.parse(json.optJSONObject("statusBar")); result.layout = LayoutOptions.parse(json.optJSONObject("layout")); result.transitions = Transitions.parse(json.optJSONObject("customTransition")); return result; }  @NonNull static Options parse(TypefaceLoader typefaceManager, JSONObject json); @CheckResult Options copy(); @CheckResult Options mergeWith(final Options other); Options withDefaultOptions(final Options defaultOptions); Options clearTopBarOptions(); Options clearBottomTabsOptions(); Options clearTopTabOptions(); Options clearTopTabsOptions(); Options clearBottomTabOptions(); Options clearSideMenuOptions(); Options clearAnimationOptions(); Options clearFabOptions(); Options clearOneTimeOptions(); static final Options EMPTY; @NonNull public TopBarOptions topBar; @NonNull public TopTabsOptions topTabs; @NonNull public TopTabOptions topTabOptions; @NonNull public BottomTabOptions bottomTabOptions; @NonNull public BottomTabsOptions bottomTabsOptions; @NonNull public OverlayOptions overlayOptions; @NonNull public FabOptions fabOptions; @NonNull public AnimationsOptions animations; @NonNull public SideMenuRootOptions sideMenuRootOptions; @NonNull public ModalOptions modal; @NonNull public StatusBarOptions statusBar; @NonNull public LayoutOptions layout; @NonNull public Transitions transitions; }### Answer:
@Test public void parsesNullAsDefaultEmptyOptions() { assertThat(Options.parse(mockLoader, null)).isNotNull(); }
@Test public void parsesJson() throws Exception { JSONObject layout = new JSONObject() .put("backgroundColor", SCREEN_BACKGROUND_COLOR); JSONObject json = new JSONObject() .put("topBar", createTopBar(TOP_BAR_VISIBLE.get())) .put("fab", createFab()) .put("bottomTabs", createBottomTabs()) .put("layout", layout); Options result = Options.parse(mockLoader, json); assertResult(result); }