### Question:
NodeUtil { public static @CheckForNull String geMixinTypes(@Nonnull Node node) throws RepositoryException { Object[] mixinTypes = node.hasProperty(JCR_MIXIN_TYPES) ? node.getProperty(JCR_MIXIN_TYPES).getValues() : node.getMixinNodeTypes(); if (mixinTypes == null || mixinTypes.length == 0) { return null; } StringBuilder commaSeparatedMixinTypeNames = new StringBuilder(64); for (int i = 0; i < mixinTypes.length; ++i) { commaSeparatedMixinTypeNames.append(mixinTypes[i].toString()); if (i < mixinTypes.length - 1) { commaSeparatedMixinTypeNames.append(','); } } return commaSeparatedMixinTypeNames.toString(); } private  NodeUtil(); static @Nonnull String getPrimaryType(@Nonnull Node node); static @CheckForNull String geMixinTypes(@Nonnull Node node);  }### Answer:
@Test public void testRetrievalOfMixinTypesViaApi() throws RepositoryException { withMixinTypes("nt:file", "rep:AccessControllable"); assertThat(geMixinTypes(this.node)).isEqualTo("nt:file,rep:AccessControllable"); }
@Test public void testRetrievalOfMixinTypesViaNodeProperty() throws RepositoryException { withJcrMixinTypesNodeProperty("nt:file", "rep:AccessControllable"); assertThat(geMixinTypes(this.node)).isEqualTo("nt:file,rep:AccessControllable"); }
@Test public void testHandlingOfMissingMixinTypes() throws RepositoryException { assertThat(geMixinTypes(this.node)).isNull(); }
@Test public void testHandlingOfEmptyMixinTypes() throws RepositoryException { withJcrMixinTypesNodeProperty(); assertThat(geMixinTypes(this.node)).isNull(); }
@Test public void testEfficientLookupOfMixinTypesViaPropertyTakesPrecedenceOverApiUsage() throws RepositoryException { withMixinTypes("via:Api"); withJcrMixinTypesNodeProperty("via:Property"); assertThat(geMixinTypes(this.node)).isEqualTo("via:Property"); }