@Test
public void testCreateWithNoIdAvailableThrows() throws NamingException {

    Object expectedObject = new Object();
    when(odmMock.getId(expectedObject)).thenReturn(null);
    when(odmMock.getCalculatedId(expectedObject)).thenReturn(null);
    try {
        tested.create(expectedObject);
        fail("IllegalArgumentException expected");
    } catch (IllegalArgumentException expected) {
        assertThat(true).isTrue();
    }
}