@Test
public void testGetId(@Mocked InetAddress inetAddress) {

    new Expectations() {
        {
            inetAddress.getAddress();
            result = new byte[]{127, 0, 0, 1};
            inetAddress.getHostAddress();
            result = "test_host";
        }
    };
    DefaultMachineId testee = new DefaultMachineId();
    assertThat(testee.getId(), is(1));
}