@Test
    public void secure_network_beacon_isCorrect() {
        //8.2.6
        final byte[] ivIndex = MeshParserUtils.toByteArray("12345678");
        final int flags = 0x00;
        final byte[] networkId = MeshParserUtils.toByteArray("3ecaff672f673370");
        final byte[] authenticationValue = MeshParserUtils.toByteArray("8ea261582f364f6f3c74ef80336ca17e");

        final String expectedSecureNetworkBeacon = "01003ecaff672f673370123456788ea261582f364f6f".toUpperCase(Locale.US);
        final byte[] networkKey = MeshParserUtils.toByteArray("7dd7364cd842ad18c17c2b820c84c3d6".toUpperCase(Locale.US));

        assertEquals(expectedSecureNetworkBeacon,
                MeshParserUtils.bytesToHex(SecureUtils.calculateSecureNetworkBeacon(networkKey, 1,
                        flags, networkId, MeshParserUtils.bytesToInt(ivIndex)), false));
    }
Example local unit test, which will execute on the development machine (host).

@see <a href="http://d.android.com/tools/testing">Testing documentation</a>
mesh/src/test/java/no/nordicsemi/android/mesh/transport/EncryptionTests.java