### Question:
NamespaceConfig { public Boolean isExploreAsPrincipal() { return exploreAsPrincipal == null || exploreAsPrincipal; } NamespaceConfig(String schedulerQueueName, @Nullable String rootDirectory,
                         @Nullable String hbaseNamespace, @Nullable String hiveDatabase,
                         @Nullable String principal, @Nullable String groupName, @Nullable String keytabURI);  NamespaceConfig(String schedulerQueueName, @Nullable String rootDirectory,
                         @Nullable String hbaseNamespace, @Nullable String hiveDatabase,
                         @Nullable String principal, @Nullable String groupName, @Nullable String keytabURI,
                         boolean exploreAsPrincipal); String getSchedulerQueueName(); @Nullable String getRootDirectory(); @Nullable String getHbaseNamespace(); @Nullable String getHiveDatabase(); @Nullable String getPrincipal(); String getGroupName(); @Nullable String getKeytabURI(); @Nullable String getKeytabURIWithoutVersion(); int getKeytabURIVersion(); Boolean isExploreAsPrincipal(); Set<String> getDifference(@Nullable NamespaceConfig other); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final String SCHEDULER_QUEUE_NAME; static final String ROOT_DIRECTORY; static final String HBASE_NAMESPACE; static final String HIVE_DATABASE; static final String EXPLORE_AS_PRINCIPAL; }### Answer:
@Test public void testNamespaceConfigDeserialize() throws Exception { String namespaceConfigWithoutExplore = "{\"scheduler.queue.name\":\"someQueue\",\"root.directory\":\"someRoot\"," + "\"hbase.namespace\":\"someHbase\",\"hive.database\":\"someHive\"}"; NamespaceConfig namespaceConfig = GSON.fromJson(namespaceConfigWithoutExplore, NamespaceConfig.class); Assert.assertTrue(namespaceConfig.isExploreAsPrincipal()); String namespaceConfigWithExplore = "{\"scheduler.queue.name\":\"somequeue\",\"root.directory\":\"some\"," + "\"explore.as.principal\":false}"; namespaceConfig = GSON.fromJson(namespaceConfigWithExplore, NamespaceConfig.class); Assert.assertFalse(namespaceConfig.isExploreAsPrincipal()); }