@Test
    public void create_segmented_access_message_isCorrect() {
        //Message #6

        final SparseArray<String> expectedSegmentedTransportPDU = new SparseArray<>();
        expectedSegmentedTransportPDU.put(0, "8026ac01ee9dddfd2169326d23f3afdf".toUpperCase(Locale.US));
        expectedSegmentedTransportPDU.put(1, "8026ac21cfdc18c52fdef772e0e17308".toUpperCase(Locale.US));

        final byte[] deviceKey = MeshParserUtils.toByteArray("9d6dd0e96eb25dc19a40ed9914f8f03f");
        final int src = 0x0003;
        final int dst = 0x1201;
        final byte[] sequenceNumber = MeshParserUtils.toByteArray("3129ab");
        final byte[] ivIndex = MeshParserUtils.toByteArray("12345678");
        final byte aszmic = 0;
        final int akf = 0;
        final byte[] upperTransportPdu = MeshParserUtils.toByteArray("ee9dddfd2169326d23f3afdfcfdc18c52fdef772e0e17308".toUpperCase(Locale.US));

        final MeshTransport meshLayerTestBase = new MeshTransport(context);
        final AccessMessage accessMessage = new AccessMessage();
        accessMessage.setSrc(src);
        accessMessage.setDst(dst);
        accessMessage.setSequenceNumber(sequenceNumber);
        accessMessage.setIvIndex(ivIndex);
        accessMessage.setDeviceKey(deviceKey);
        accessMessage.setAkf(akf);
        accessMessage.setAszmic(aszmic);
        accessMessage.setUpperTransportPdu(upperTransportPdu);

        meshLayerTestBase.createLowerTransportAccessPDU(accessMessage);

        final SparseArray<byte[]> actualSegmentedTransportPdu = accessMessage.getLowerTransportAccessPdu();

        Assert.assertTrue("Segment count does not match", expectedSegmentedTransportPDU.size() != actualSegmentedTransportPdu.size());

        if (expectedSegmentedTransportPDU.size() == actualSegmentedTransportPdu.size()) {
            final int size = actualSegmentedTransportPdu.size();
            for (int i = 0; i < size; i++) {
                final byte[] actualTransportPDU = actualSegmentedTransportPdu.get(i);
                assertEquals(expectedSegmentedTransportPDU.get(i), MeshParserUtils.bytesToHex(actualTransportPDU, 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/LowerTransportLayerTests.java