@Test
    public void k2_master_isCorrect() {
        final byte[] n = MeshParserUtils.toByteArray("f7a2a44f8e8a8029064f173ddc1e2b00");
        final SecureUtils.K2Output k2Output = SecureUtils.calculateK2(n, SecureUtils.K2_MASTER_INPUT);
        final int nid = 0x7f;
        assertEquals(nid, k2Output.getNid());

        final byte[] encryptionKey = MeshParserUtils.toByteArray("9f589181a0f50de73c8070c7a6d27f46");
        assertArrayEquals(encryptionKey, k2Output.getEncryptionKey());

        final byte[] privacyKey = MeshParserUtils.toByteArray("4c715bd4a64b938f99b453351653124f");
        assertArrayEquals(privacyKey, k2Output.getPrivacyKey());
    }
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