@Test
  public void invalidProfilePassed() throws Exception {
    String json = Resources.toString(Resources.getResource("inconsistent_quicklinks_profile.json"), Charsets.UTF_8);
    assertTrue(
        "An instance of " + ShowAllLinksVisibilityController.class.getSimpleName() + " should have been returned",
        QuickLinkVisibilityControllerFactory.get(json) instanceof ShowAllLinksVisibilityController);

    json = Resources.toString(Resources.getResource("inconsistent_quicklinks_profile_2.json"), Charsets.UTF_8);
    assertTrue(
        "An instance of " + ShowAllLinksVisibilityController.class.getSimpleName() + " should have been returned",
        QuickLinkVisibilityControllerFactory.get(json) instanceof ShowAllLinksVisibilityController);
  }
If receives an invalid quick profile string (e.g. valid json but no filters defined or contradicting filters),
the factory should return an instance of {@link ShowAllLinksVisibilityController} to mimic legacy behavior.
ambari-server/src/test/java/org/apache/ambari/server/state/quicklinksprofile/QuickLinkVisibilityControllerFactoryTest.java