@Test
public void testReadFirmwareVersion() {

    doAnswer(new Answer() {
        public Object answer(InvocationOnMock invocation) {
            Object[] args = invocation.getArguments();
            fwVersionCallback = (DeviceProfile.VersionCallback) args[0];
            return null;
        }
    }).when(mockDeviceProfile).getFirmwareVersion(any(DeviceProfile.VersionCallback.class));
    bean.readFirmwareVersion(new Callback<String>() {
        @Override
        public void onResult(String result) {
            assertThat(result).isEqualTo("fwfoo");
        }
    });
    fwVersionCallback.onComplete("fwfoo");
}