MachineDetailsDocumentConverter { public MachineDetails toMachineDetails(final SpaceDocument document) throws IllegalStateException { if (document == null) { return null; } final Object pmdObject = com.gigaspaces.document.DocumentObjectConverter.instance().toObject(document); if (pmdObject == null) { return null; } if (!(pmdObject instanceof PersistentMachineDetails)) { throw new IllegalStateException( "Unsupported object received in failed agent context. Was expecting MachineDetails but got: " + pmdObject.getClass().getName()); } final PersistentMachineDetails pmd = (PersistentMachineDetails) pmdObject; final MachineDetails md = pmd.toMachineDetails(); return md; }  SpaceDocument toDocument(final MachineDetails md); MachineDetails toMachineDetails(final SpaceDocument document);  }
@Test public void testToMachineDetails_1() throws Exception { MachineDetailsDocumentConverter fixture = new MachineDetailsDocumentConverter(); SpaceDocument document = null; MachineDetails result = fixture.toMachineDetails(document); assertEquals(null, result); }
@Test(expected = java.lang.IllegalStateException.class) public void testToMachineDetails_2() throws Exception { MachineDetailsDocumentConverter fixture = new MachineDetailsDocumentConverter(); SpaceDocument document = new SpaceDocument(); MachineDetails result = fixture.toMachineDetails(document); assertNotNull(result); }
@Test(expected = java.lang.IllegalStateException.class) public void testToMachineDetails_3() throws Exception { MachineDetailsDocumentConverter fixture = new MachineDetailsDocumentConverter(); SpaceDocument document = new SpaceDocument(); MachineDetails result = fixture.toMachineDetails(document); assertNotNull(result); }
@Test(expected = java.lang.IllegalStateException.class) public void testToMachineDetails_4() throws Exception { MachineDetailsDocumentConverter fixture = new MachineDetailsDocumentConverter(); SpaceDocument document = new SpaceDocument(); MachineDetails result = fixture.toMachineDetails(document); assertNotNull(result); }